#define buttonPin 7 #define ledPin 8 int pushbuttonState = 0; int counter = 0; void setup() { // put your setup code here, to run once: pinMode(ledPin, OUTPUT); pinMode(buttonPin, INPUT); } void loop() { // put your main code here, to run repeatedly: pushbuttonState = digitalRead(buttonPin); if (pushbuttonState == LOW){ counter++; for (int i=0; i