int buttonState =0; void setup(){ pinMode(13, OUTPUT); //Count pin pinMode(11, INPUT); //Button pin pinMode(12, OUTPUT); //reset pin } void loop(){ // read the state of the pushbutton value: buttonState = digitalRead(11); // check if the pushbutton is pressed. If it is, the buttonState is HIGH: if (buttonState == HIGH) { digitalWrite(12, HIGH);//send reset signal delay(1000); // waits digitalWrite(12, LOW); //stops reset signal } else { digitalWrite(12, LOW); } digitalWrite(4, HIGH); if (analogRead(0) >50){ //checking if laser is on the photoresistor digitalWrite(13, LOW);//sends short signal to 4026 //digitalWrite(13, LOW);//trigering on number being added to the score } else { digitalWrite(13, HIGH); } }