#define buzz 4
#include <ezButton.h>
ezButton button(7);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
button.setDebounceTime(50);
button.setCountMode(COUNT_RISING);
pinMode(buzz, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
button.loop();
if(button.isPressed())
{
unsigned long count=button.getCount();
for(count=1; count<5; count++)
{
digitalWrite(buzz, HIGH);
Serial.print("The button is pressed: ");
Serial.println(count);
}
// int rem=count%5;
}
}