Press or hold a button once or twice - Arduino Series

Опубликовано: 28 Май 2026
на канале: Patrick.
10,078
188

Additional help is available ONLY in the community: https://linktr.ee/patrickhauswald

In this video, I'll show you how to use a button so that it triggers different events when pressed once, twice, or held down. In my example, the red LED turns on when pressed once, the green LED turns on when pressed twice, and the blue LED turns on when held down. If you repeat the process, the LEDs turn off again.

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

If you liked the video, I'd appreciate your feedback.

Don't want to miss any new videos?
Then subscribe to my channel for free:
   / @patrick.  

and/or

Support me on Patreon:
  / pathtm  

Alternatively, you can order on Amazon using this link and I will receive a small commission:
https://amzn.to/2SOHHiE *

Link to OneButton library:
https://github.com/mathertel/OneButton

Link to the circuit:
https://mega.nz/file/jqgAyAgT#btR0u6-...

Link to Program code:
https://mega.nz/file/Hn5AXQTJ#U_sjUBJ...

Have a nice day everyone :)

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
The links marked with * are affiliate links.
This means I receive a small commission if you purchase something through the link. Of course, the price remains the same for you.
I would be very grateful for your support :)