//Blink //Turns an LED on for one second, then off for one second, repeatedly //the higher the number, the slower the speed of blinking int timer = 600; // the setup function runs once when you press reset or power the board void setup() { // use for loop to initialize each pin as an output for (int pin = 1; pin <=5; pin++) { pinMode(pin, OUTPUT); } } // the loop function runs over and over again forever void loop() { //to help the pins blinking from lowest pin to highest for (int pin = 1; pin <=5; pin++) { //turning on pin digitalWrite(pin, HIGH); //applying timer function and adjusting blinking speed delay(timer); //turning off pin digitalWrite(pin, LOW); } //to help the pins blinking from highest pin to lowest for (int pin = 5; pin >=1.; pin--) { //turning on pin digitalWrite(pin, HIGH); //applying timer function and adjusting blinking speed delay(timer); //turning off pin digitalWrite(pin, LOW); } }