ButtonToSwitch

Signal Input/Output

Implement simple to complex switches out of simple buttons -or any other momentary digital input signal- this library with an easy consistent API will take care of debouncing, deglitching, toggle on-off, keep activation times in a completely unnatended manner.
This Arduino library includes classes that lets you implement all kind of switches out of simple buttons (Momentary Push Buttons or MPBs), PIR sensors, RFID readers or any other source of momentary digital signals. Add any kind of switch to a project by using simple MPBs and this library to simulate the internal mechanism of each of them, starting from a Debounced Push Button and extending to Delayed Start Push Button, Toggle (Latched) Push Button, Time Latched Push Button, External Release Latched Push Button, Staircase Timed Button, On/Off/Dimmers, and more... The library gives the embedded behavior to build more complex switches classes by simple composition: menu panels, rotary enum switches, etc.

Author: Gabriel D. Goldman

Maintainer: Gabriel D. Goldman

Read the documentation

Compatibility

This library is compatible with all architectures so you should be able to use it on all the Arduino boards.

Releases

To use this library, open the Library Manager in the Arduino IDE and install it from there.