int led1 = 6, led2 = 7, led3 = 8;
void setup() {
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
}
void loop() {
for(int i=6;i<=8;i++){
digitalWrite(i, HIGH);
delay(500); //ms
digitalWrite(i, LOW);
}
for(int j=8;j>=6;j--){
digitalWrite(j, HIGH);
delay(500); //ms
digitalWrite(j, LOW);
}
}