int arrayLed [] = {0,1,2,3,4,5,6,7};
void setup() {
for(int i = 0; i < 8; i++){
pinMode(arrayLed[i], OUTPUT); // i++ = i plus 1
}
}
void loop() {
//int i = 0;
//digitalWrite(arrayLed[i], HIGH);
//i +=1;
for(int i = 0; i < 8; i++){
digitalWrite(arrayLed[i], HIGH); // i++ = i plus 1
delay(500);
}
for(int i = 7; i > -1; i--){
digitalWrite(arrayLed[i], LOW); // i++ = i plus 1
delay(500);
}
}