int pins[10] = {23, 22, 19, 18, 5, 17, 16, 4, 0, 2};
void setup() {
// put your setup code here, to run once:
for (int i = 0; i < 10; i++) {
pinMode(pins[i], OUTPUT);
digitalWrite(pins[i], LOW);
}
}
void loop() {
int index = 0;
while (true) {
digitalWrite(pins[index], HIGH);
digitalWrite(pins[(index + 9) % 10], LOW);
index += 1;
delay(1000); // this speeds up the simulation
}
}