Light up the LED on button press.

This commit is contained in:
Johannes Findeisen 2022-12-14 22:30:33 +01:00
commit 3da4b46843

View file

@ -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