/*Blink LED array This sketch is efficient in the you do not have to leave
pin 11 unconnected as you would normally if you used code random(5,11)
This sketch created and copyrite by Gary C. Granai https://www.facebook.com/gary.granai and is included in the
Arduino For Model Railing Library at https://steamtraininfo.com/arduino-projects
You are free to use this sketch and amend it for your own personal use as long as these credits remain intact.
Using it in any manner or form for commercial purposes is prohibited.*/
int leds[6] = {5, 6, 7, 8, 9, 10};
#define on 11
void setup() {
digitalWrite(on, HIGH);
for (int i; i < sizeof(leds) / sizeof(int); i++) {
pinMode(leds[i], OUTPUT);
delay(10);
}
}
void loop() {
digitalWrite(leds[random(0, sizeof(leds) / sizeof(int))], HIGH);
delay(random(30, 150));
digitalWrite(leds[random(0, sizeof(leds) / sizeof(int))], LOW);
}