# 0x1abin/MultiButton

Button driver for embedded system

Repository: https://github.com/0x1abin/MultiButton
Canonical: https://ross.abutalabs.com/products/multibutton
Language: C
License: MIT
License Family: permissive
Last push: 2026-03-17T08:55:32+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 72, release rhythm 35, longevity 100
- inputs: {"age_days": 3656, "days_push": 169, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2358, forks 735 (observed 2026-08-28T04:06:40.772626+00:00)

## What it is
A compact C library implementing a state-machine-driven multi-button driver for embedded systems, supporting seven event types with built-in debounce. It uses a linked-list architecture to support unlimited button instances with callbacks or polling, at roughly 30 bytes of memory per button.

## Use cases
- detect single and double clicks on GPIO buttons in firmware
- handle long press and repeat press events on embedded devices
- debounce mechanical buttons without external hardware
- manage many buttons with a lightweight C library
- poll button events from a timer interrupt in bare-metal code
- integrate button handling with an RTOS using thread-safe locks

## When to choose
- you need reliable click/long-press detection on microcontrollers in C
- memory footprint matters and you want ~30 bytes per button
- you want both callback and polling event handling with configurable timing

## When to avoid
- you need capacitive touch or analog button sensing
- your project is not in C or lacks a periodic tick source
- you need GUI-level button widgets rather than raw GPIO input

## Facets
- artifact type: library
- maturity: stable
- function: embedded, state-management
- domain: embedded-systems, hardware, developer-tools
- platform: embedded, c, cross-platform
- tags: button-driver, state-machine, debounce, bare-metal, rtos, input-handling, driver, event-handling

## Member repositories
- 0x1abin/MultiButton (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.772626+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:36:14.181705+00:00, confidence not recorded.
  - readme: https://github.com/0x1abin/MultiButton (fetched 2026-08-28T04:06:40.772626+00:00, sha 291f600e794c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
