Closed giannoug closed 3 years ago
Hey George, I will try to replicate this issue.
Hey George, I have a hard time duplicating the behavior you describe.
But please checkout the latest version via GitHub and give it a try. I updated how I set the Initial values of the state
and prev_state
vars. Maybe this will solve your issue.
Consider the following button:
Button2 bigRedButton = Button2(bigRedButtonPin, INPUT_PULLUP, false, false);
For some weird reason, the button is pressed while the Arduino reboots. This doesn't fire any callbacks. I have tried
setPressedHandler
,setReleasedHandler
andsetChangedHandler
. Since the button is not active low, shouldn't it trigger on boot? It works fine if I release and press it after booting.