Hi, I'm trying to achieve the following functionality.
When button pressed,
Timer starts, counting from 0 to 1,2,3, N...
Button Low
Timer stops
assign number of seconds to a variable
reset timer to 0
are there any libraries I can use for the timer. I couldn't find any to meet these requirements, I would like to know if anyone else had to do something similar.
Look at the state change detection example, too. You have things to do when the switch BECOMES pressed (not IS pressed) and things to do when the switch BECOMES released (not IS released).