Simple polling input debounce Arduino library. Also usable in the PlatformIO ecosystem.
- used for push-button like switches
- delivers input value (state) after it has been stable (not flickering) for longer than the debounce period
- delivers continuous or single-shot pressed-on time duration [ms]
- delivers pressed-on time duration on release [ms]
- handles input pin with:
- external pull-down resistor
- external pull-up resistor
- internal pull-up resistor (default)
- handles switches with switching function:
- normally open (default)
- normally closed
Available from the Arduino IDE Library Manager and for PlatformIO as library (Id #123).
Just see the examples:
- general - tricky
- using callback functions - โ preferred method
- using inheritance - advanced
Apache License 2.0
-- Mario