float timer1 = 78.9856655; // set timer.
void setup() {
// use a for loop to initialize each pin as an output:
for (int ledPin = 2; ledPin < 13; ledPin++) {
pinMode(ledPin, OUTPUT); // initialize ledPin as an output:
}
}
void loop() {
// loop run from the ledPin 6 to ledPin 13:
for (int ledPin = 6; ledPin < 13; ledPin++) {
digitalWrite(ledPin, HIGH);// set pin on:
delay(timer1); // call the timer1:
digitalWrite(ledPin, LOW);// set pin off:
}
// loop run from the ledPin 13 to ledPin 6:
for (int ledPin = 13; ledPin >= 6; ledPin--) {
digitalWrite(ledPin, HIGH);// set pin on:
delay(timer1); // call the timer1:
digitalWrite(ledPin, LOW);// set pin off:
}
}