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