This is an arduino controlled project and uses leds, jumper wires, and a breadboard. This is one of my first attempts on programming arduino and I am pleased with the outcome. I’m ten years old and I just started programming 2 weeks ago.
Step 1: Parts Check
[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]
Let’s make sure we have all the correct parts. We need a large breadboard, 4 green LEDs, 4 yellow LEDs, 3 red LEDs, an arduino, and about 25 jumper wires. The arduino I used was the UNO smd, but it might work with older or newer versions also.[/box]
Step 2: Placing the LEDs on the breadboard
Next, let’s place the LED’s on the breadboard. Make sure to put the long side of the LED (positive side) to the left on every one. The order that you put them is 4 green, 4 yellow, and then 3 red. Put 1 pin spacing inbetween each LED.
Step 3: Wiring the Positive
Now, we are going to wire the positive side on the LEDs to the digital pins on the arduino. For this we will take a jumper wire and put it at the pin above the left side of the first green LED and connect the other side to digital pin 3. We will do the same for the second green LED at digital pin 4 and so forth and so on.
Step 4: Connecting the Negatives
Next, we will be connecting the negative terminals in each LED together and then connect them all to the negative on the arduino. First, we will take a jumper wire and connect one of the ends to the pin in the back of the first LED and the other two pins behind the second LED. Then we will take another jumper wire and put it 1 pin behind the second LED and the other two pins behind the third LED. Repeat. After done, take one jumper wire and put one end 2 pins behind the first LED and the other in “GND”.
Note : I switched Arduinos for the photo.
Step 5: The Code
You’re almost there! Just copy this code, download it to the arduino, and you’re done.
#define LED01 13 // says led is at # 13
#define LED02 12
#define LED03 11
#define LED04 10
#define LED05 9
#define LED06 8
#define LED07 7
#define LED08 6
#define LED09 5
#define LED10 4
#define LED11 3
Read more: Bouncing Multicolored LED line