29 pinMode(LED_BUILTIN, OUTPUT);
31 Button::setHeldTime(2000);
32 Button::setIdleTime(5000);
54 digitalWrite(LED_BUILTIN, HIGH);
56 digitalWrite(LED_BUILTIN, LOW);
Button btn(BUTTON_PIN, holdableCallback)
The button to check.
void setup()
Setup the Debouncable example.
void holdableCallback(Button::CALLBACK_EVENT, uint8_t)
Callback function for button events.
#define BUTTON_PIN
Connect button between this pin and ground.
void loop()
Control the Debouncable example.