Light up the LED on button press.
This commit is contained in:
parent
cedcc312e3
commit
3da4b46843
1 changed files with 2 additions and 0 deletions
|
|
@ -73,10 +73,12 @@ void loop() {
|
|||
// Button is pressed
|
||||
last = millis();
|
||||
count++;
|
||||
digitalWrite(LED_PIN, HIGH);
|
||||
// Wait until button is released
|
||||
while (digitalRead(BUTTON_PIN) == LOW) {
|
||||
delay(1);
|
||||
}
|
||||
digitalWrite(LED_PIN, LOW);
|
||||
}
|
||||
|
||||
// Wait PAUSE time before executing a command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue