Beverly
Button Events for AVR Easily.
Beverly is a minimal Arduino library for handling push buttons cleanly. It covers the full event surface you actually need: debounce, press, release, hold and double-press. in under 60 lines of code, with a negligible memory footprint.
It targets AVR microcontrollers but runs on any Arduino-compatible architecture that exposes pinMode(), digitalRead() and millis().
Events
Idle- button untouchedPressed- on pressReleased- on releaseHeld- reported continuously while held downDoublePressed- double-press detection
Design notes
Internal state is managed through a bitmask via Facebits. Timing uses millis() with 16-bit overflow-safe logic, so it behaves correctly even on long-running sketches.
start() must be called in setup() before using watch().
Installation
Available through the Arduino Library Manager: search for Beverly. Alternatively, download as ZIP and add via Sketch → Include Library → Add .ZIP Library.
Licensed under the MIT License.