#include <EButton.h>
EButton button(2);
void click(EButton&) {
static bool state = LOW;
state = not state;
digitalWrite(LED_BUILTIN, state);
}
void setup() {
button.attachSingleClick(click);
}
void loop() {
button.tick();
}#include <EButton.h>
EButton button(2);
void click(EButton&) {
static bool state = LOW;
state = not state;
digitalWrite(LED_BUILTIN, state);
}
void setup() {
button.attachSingleClick(click);
}
void loop() {
button.tick();
}