For beginners: The simple way to program for multiple buttons

Pesky Characters.. :o again thanks so much :slight_smile:

Is it possible to define both times that is for Low and high:
For example, correct code as per library is:

type or pasbutton.setDebounceTime(50);

This is for both debounce i.e on low and high.

Is it possible to do something like this


Or is it possible to amend library somehow to predefine HIGH time?

im not sure if this is the right place, but im playing with ezButton library, just trying to figure it out by compiling lots of simple sketches and seeing if they work.
this is just a few lines where im trying to change a counter with two buttons.
i got the counter to go up and down by using ++ and -- but i want to do it differently this time.
i cant figure out why but it always starts at 97 rather than the 0 i specified.
anyway this code doesnt do what i want and need a little help figuring out what im doing wrong.
no error code btw.

#include <ezButton.h>

ezButton button1 (2);
ezButton button2 (3);

void setup() {
Serial.begin (9600);

int counterPrev = 0;
int counterNew = 0;


void loop() {

int counterPrev;
int counterNew;


counterNew = (counterPrev + 5);
counterPrev = (counterNew);

counterNew = (counterPrev - 5);
counterPrev = (counterNew);


I am sorry for the late reply.
The counterPrev variable should be the global variable

I am sorry for the late reply.
Currently, it is impossible. But you can freely modify the source code to make it work as your desire.