Single Switch Multiple Functions


In this project, I am going to teach you how to give multiple functions in a single push switch. Below is the list of different ways of using the switches for different functions,
  • Single Tap
  • Double Tap
  • Triple Tap
  • Four Tap
  • Hold
  • Tap and hold
"there can be more if you can be creative" 


Things Required

  • Arduino or any other compatible board
  • Micro push button
  • RGB LED, for testing the switch functions.

  • First, we calculate the time gap between each button press and the number of times the button is pressed 
  • Then according to the no. of times, the button is pressed we are calling different functions
  • like the same way if the time gap is more than the preset value then we consider it as a "hold" and we call the functions which we associate to it
watch the full video for detailed programming instructions.


  • Connect one leg of the push button to any digital pin.
  • connect the other leg to the ground of Arduino.

Full Video

Part 1

Part 2


Single Switch Multiple Functions Reviewed by Abu Yazid on April 25, 2019 Rating: 5

No comments:

All Rights Reserved by DIY Usthad © 2014 - 2019

Contact Form


Email *

Message *

Powered by Blogger.