Introduction: RBGY LED Light Chaser

This web page will teach you how to make a four-color LED Light Chaser. LED Light Chaser is a row of light, in which the lights will be turned on from the first light and to the last light, and turn off after each light has turned on. This LED Light Chaser has the function of putting in places in the dark to make people be aware of in the dark, like if there is a puddle of water on the ground in the dark, then you can put this product on the ground to let people aware of the puddle of water and not to step on it. This will be better than the previous design because if all the lights are on at the same time then it may be too bright in the dark and will make people's eyes feel uncomfortable.

Supplies

- Jumper Wires x13

- Arduino Leonardo

- RGBY LEDs (x3 each)

- Breadboard

- USB Cable for Arduino

Step 1: Circuit Diagram

1. Connect the negative electrode to the GND

2. Connect the lights to the Breadboard by the shorter side of the LED light connected to the negative electrode on the board

3. Connect one side of the wires to the digital pins 2 -12, and another side on the Breadboard which one wire connects to one LED light.

4. Plug the USB cable to the Arduino Leonardo board and another side to your computer.

Step 2: Code

int ledpin;

int pot = A0;

void setup() {

for(ledpin=2;ledpin<=13;ledpin++){

pinMode(ledpin,OUTPUT);

}

}

void loop() {

for(ledpin=2;ledpin<=13;ledpin++){

int value = analogRead(pot);

digitalWrite(ledpin,HIGH);

delay(100);

digitalWrite(ledpin,LOW);

}

}

Code:

https://create.arduino.cc/editor/iris_lin/3b237238...

Step 3: Final Product

This is the final version that the light chaser will present.

Reference:

https://www.instructables.com/Multiple-RGB-Led-Cha...