//disco light
const int ledPins[] = {2, 4, 6, 8}; // Pins for the four LEDs
const int delayTime = 100; // Delay time between color changes
void setup() {
for (int i = 0; i < 4; i++) {
pinMode(ledPins[i], OUTPUT);
}
randomSeed(analogRead(0)); // Seed the random number generator with an analog value
}
void loop() {
for (int i = 0; i < 4; i++) {
int randomColor = random(0, 256);
analogWrite(ledPins[i], randomColor);
}
delay(delayTime);
}