button icon indicating copy to clipboard operation
button copied to clipboard

Button initial state is wrong if it is pressed when arduino starts

Open jeanfabre opened this issue 5 months ago • 0 comments

If the button is pressed when you start the program, previousSteadyState is wrong, and you first need to wait for the button to be released for the ezbutton to start reflecting the real state.

Solution: previousSteadyState should be set to -1 and during the setup or the first loop detected as not yet HIGH or LOW and dealt with accordingly ( setting lastSteadyState to the opposite for the rest of the logic to work).

jeanfabre avatar Sep 15 '24 05:09 jeanfabre