mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-20 21:01:25 +03:00
small changes to the Debounce example
This commit is contained in:
@ -75,12 +75,12 @@ void loop() {
|
||||
// only toggle the LED if the new button state is HIGH
|
||||
if (buttonState == HIGH) {
|
||||
ledState = !ledState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set the LED:
|
||||
digitalWrite(ledPin, ledState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// save the reading. Next time through the loop,
|
||||
// it'll be the lastButtonState:
|
||||
|
Reference in New Issue
Block a user