I am new to Arduino and trying to do a project. I have One push button (momentary) on Pin A2 and other side to Ground.
I have an LED setup on Pin A3.
I want to detect the button press and have different reactions.
If button has short press, turn On LED and run a routine (activate pin 2,3,4,5 for 10 sec, then turn Off)
If button has long press (3 sec), Blink LED and run another routine (activate pin 6,7,8,9 for 10 sec, then turn Off)
At anytime during any of the routines I would like the button to Exit the routine and be ready for the next short or long press detection.
Thanks in advance