uploaded 1 month ago
GPIO and ADC button driver


Component: Button

Chinese documentation

After creating a new button object by calling function button_create(), the button object can create press events, every press event can have its own callback.

List of supported events: * Button pressed * Button released * Button pressed - repeated * Button single click * Button double click * Button long press start * Button long press hold

There are two ways this driver can handle buttons: 1. Buttons connected to standard digital GPIO 2. Multiple buttons connected to single ADC channel


Supports all targets

License: Apache-2.0

To add this component to your project, run: add-dependency espressif/button^2.2.0
or download archive


  • ESP-IDF >=4.0