Your above code will activate when the button is released. This is so you get a single UP, instead of UP UP UP UP.... while holding the button.
Check out the examples included with the bounce2 library.
Your above code will activate when the button is released. This is so you get a single UP, instead of UP UP UP UP.... while holding the button.
Check out the examples included with the bounce2 library.