9. Single Double Click and Long Press Detection

Connect a regular push-button switch to the microcontroller’s GPIO pin. Interface it such that the microcontroller should be able to detect a single click, double click, and long press, similar to a computer mouse.

Print each action on a serial terminal (e.g., putty, Arduino IDE)

Example


 


 


 

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!