Loading...
Loading...
// Water Ripple Effect
const int NUM_LEDS = 6;
const int ledPins[] = {3, 5, 6, 9, 10, 11}; // PWM pins
void setup() {
for (int i = 0; i < NUM_LEDS; i++) {
pinMode(ledPins[i], OUTPUT);
}
randomSeed(analogRead(0));
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++) {
int brightness = random(50, 200);
analogWrite(ledPins[i], brightness);
}
delay(random(100, 300));
}This is starter code - modify and expand for your specific needs.
Before building this project, make sure you have the Arduino IDE installed and are comfortable uploading basic sketches to your board.
Most projects use standard Arduino libraries. Some may require additional libraries like AccelStepper, Servo, or NmraDcc - install these through the Arduino Library Manager.