Button
Button copied to clipboard
Button is a tiny library to make reading buttons very simple. It handles debouncing automatically, and monitoring of state.
# Feature This feature was added to add support for event-driven style code by using callbacks or lambdas. # Motivation * Event-driven style code may sometimes be easier to understand...
In commit 72695525, @elektronikworkshop added an optional parameter to the `Button` initialization function that allows the user to specify the denounce time in ms. This PR adds documentation for that...
Added _debounce_state;
Fix debounce algorithm. Original implementation does not filter noisy reads and return wrong value in case if short glitches appeared on the line. this value will remain for delay time...
Implement repeated press / long press detection (see #8), including documentation. Real-life usage example of these new methods can be found in the [Arduino Alarm Clock project](https://goodarduinocode.com/projects/alarm-clock?utm_source=github&utm_medium=social&utm_campaign=button), where the library...
Hi, Thanks for maintaining this library! I want to use it in an alarm clock example I'm building for [GoodArduinoCode](https://goodarduinocode.com), and for that, I'd need an option to detect long...
Hello, Ensuring that this library can still be compiled (using a [continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) service such as [Travis](https://en.wikipedia.org/wiki/Travis_CI)) could be a nice improvement. Running some [unit tests](https://en.wikipedia.org/wiki/Unit_testing) to ensure that code...
Hello, looks like it's possible to softlock button in read() method. If button changes at time: millis_max_value - _delay - some_small_value and doesn't change state back until millis() overflow, then...
Hi @madleech! Love the library; it's super simple and very easy to use. I'm working on a platformio project, and noticed that the version on [[their registry](https://registry.platformio.org/libraries/madleech/Button)] is the very...