const int LED_PINS[] = {2, 3, 4, 5, 6, 7, 8, 9};
void setup()
{
int LED_PINS[] = {2, 3, 4, 5, 6, 7, 8, 9};
// Initialize each LED pin as an output
for (int i = 0; i < 8; i++)
{
pinMode(LED_PINS[i], OUTPUT);
}
}
void loop()
{
// Cycle through each LED
for (int i = 0; i < 8; i++)
{
digitalWrite(LED_PINS[i], HIGH); // Turn the LED off
delay(500);
digitalWrite(LED_PINS[i], LOW); // Turn the LED on
}
}