byte LEDS[] = {0, 1, 2, 3, 4, 5, 6};
const byte LED_COUNT = sizeof(LEDS);
void setup() {
}
void loop() {
for (int i = 0; i < LED_COUNT; i++) {
for (int j = 0; j < LED_COUNT; j++) {
if (i != j) {
pinMode(LEDS[i], OUTPUT);
pinMode(LEDS[j], OUTPUT);
digitalWrite(LEDS[i], LOW);
digitalWrite(LEDS[j], HIGH);
delay(50);
pinMode(LEDS[i], INPUT);
pinMode(LEDS[j], INPUT);
}
}
}
}