byte leds[]={2,3,4,5,6,7};
void setup() {
// put your setp code here, to run once:
for(byte i=0; i<6; i++)
{
pinMode(leds[i], OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
for(byte x=0; x<6; x++)
{
digitalWrite(leds[x], HIGH);
delay(100);
digitalWrite(leds[x], LOW);
delay(100);
}
for(byte y=6; y>0; y--)
{
digitalWrite(leds[y], HIGH);
delay(100);
digitalWrite(leds[y], LOW);
delay(100);
}
}