#include <ezButton.h>
ezButton buttonStart(7);
void setup() {
Serial.begin(9600);
// put your setup code here, to run once:
buttonStart.setDebounceTime(50); // set debounce time to 50 milliseconds
buttonStart.setCountMode(COUNT_FALLING);
}
void loop() {
// put your main code here, to run repeatedly:
delay(2000);
// byte buttState = buttonStart.getStateRaw();
if (buttonStart.getStateRaw() == LOW) {
Serial.println("1: " + String(buttonStart.getStateRaw()));
}
else {
Serial.println("2: " + String(buttonStart.getStateRaw()));
}
delay(100);
}