File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
build/shared/examples/02.Digital/Debounce Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ int ledState = HIGH; // the current state of the output pin
4040int buttonState; // the current reading from the input pin
4141int lastButtonState = LOW; // the previous reading from the input pin
4242
43- // the following variables are long's because the time, measured in miliseconds,
44- // will quickly become a bigger number than can be stored in an int.
43+ // the following variables are unsigned long's because the time, measured in miliseconds,
44+ // will quickly become a bigger number than can't be stored in an int.
4545unsigned long lastDebounceTime = 0 ; // the last time the output pin was toggled
4646unsigned long debounceDelay = 50 ; // the debounce time; increase if the output flickers
4747
You can’t perform that action at this time.
0 commit comments