int ledPins[]={2,3,4,5,6,7,8,9};
int pinCount=8;
int timer=200;
int thisPin ;
void setup() {
// put your setup code here, to run once:
for(int thisPin=0; thisPin<pinCount ;thisPin++){
pinMode(ledPins[thisPin], OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
for( (thisPin) = 0; (thisPin) <= pinCount; thisPin++){
delay(50);
digitalWrite(ledPins[(2*thisPin)-1], HIGH);
delay(timer);
digitalWrite(ledPins[2*thisPin], HIGH);
delay(timer);
digitalWrite(ledPins[(2*thisPin)-1], LOW);
delay(timer);
digitalWrite(ledPins[2*thisPin], LOW);
}
}