mathertel/OneButton
An Arduino library for using a single button for multiple purpose input. observed · 2026-08-28
Health v2 · maintenance only
64/100
- Activity 68
- Release rhythm 39
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4630
- days_rel: 194
- days_push: 194
- n_releases_24m: 1
Adoption not part of the score
1108 stars · 246 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
An Arduino C++ library that detects single clicks, double clicks, and long presses from a single pushbutton attached to one digital input pin, allowing one button to serve multiple input functions. It uses a non-blocking tick() function and a finite-state machine, with a lightweight OneButtonTiny variant for small processors.
Use cases
- detect single, double, and long button presses on Arduino
- use one physical button for multiple functions
- debounce a pushbutton without blocking the main loop
- attach callback functions to button press events
- read button input on ATtiny microcontrollers with limited memory
When to choose
- you have limited input pins and want one button to trigger multiple actions
- you need non-blocking button event detection in an Arduino sketch
- you want simple debouncing and click/press event callbacks out of the box
When to avoid
- you need multi-button matrix scanning or touch input
- your project is not on an Arduino-compatible embedded platform
Facets
library · maturity stable
embedded embedded-systems hardware developer-tools embedded cpp iot arduino-library push-button debouncing finite-state-machine input-handling event-handling
2 sources
- readme: https://github.com/mathertel/OneButton · fetched 2026-08-28 · 307dd0f3dfd6
- homepage: http://www.mathertel.de/Arduino/OneButtonLibrary.aspx · fetched 2026-08-29 · 190c60b85c15
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mathertel/OneButton | main | 64 |
For agents
markdown · JSON · MCP: product_card(name="mathertel/OneButton")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem