Introduction: Bouncing Multicolored LED Line

About: White House Maker Faire // 20 years old // U.C. Berkeley Junior in M.E.T. program. CEO of Qtechknow, maker and electronics enthusiast, I teach Arduino classes, and put making into schools! My successful Qduino…
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

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.

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 theleftside 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

void setup()
{
pinMode(LED01, OUTPUT); // digital pin is output
pinMode(LED02, OUTPUT); // digital pin is output
pinMode(LED03, OUTPUT); // digital pin is output
pinMode(LED04, OUTPUT); // digital pin is output
pinMode(LED05, OUTPUT); // digital pin is output
pinMode(LED06, OUTPUT); // digital pin is output
pinMode(LED07, OUTPUT); // digital pin is output
pinMode(LED08, OUTPUT); // digital pin is output
pinMode(LED09, OUTPUT); // digital pin is output
pinMode(LED10, OUTPUT); // digital pin is output
pinMode(LED11, OUTPUT); // digital pin is output

}

void loop()
{
digitalWrite(LED01, HIGH); // turns LED on
delay(30);
digitalWrite(LED02, HIGH); // turns LED on
delay(30);
digitalWrite(LED01, LOW); // turns LED off
delay(30);
digitalWrite(LED03, HIGH); // turns LED on
delay(30);
digitalWrite(LED02, LOW);
delay(30);
digitalWrite(LED04, HIGH); // turns LED on
delay(30);
digitalWrite(LED03, LOW);
delay(30);
digitalWrite(LED05, HIGH); // turns LED on
delay(30);
digitalWrite(LED04, LOW);
delay(30);
digitalWrite(LED06, HIGH); // turns LED on
delay(30);
digitalWrite(LED05, LOW);
delay(30);
digitalWrite(LED07, HIGH);
delay(30)
digitalWrite(LED06, LOW);
delay(30);
digitalWrite(LED08, HIGH); // turns LED on
delay(30);
digitalWrite(LED07, LOW);
delay(30);
digitalWrite(LED09, HIGH); // turns LED on
delay(30);
digitalWrite(LED08, LOW);
delay(30);
digitalWrite(LED10, HIGH); // turns LED on
delay(30);
digitalWrite(LED09, LOW);
delay(30);
digitalWrite(LED11, HIGH); // turns LED on
delay(30);
digitalWrite(LED10, LOW);
delay(30);
digitalWrite(LED11, LOW);
delay(30);
digitalWrite(LED11, HIGH);
delay(30);
digitalWrite(LED10, HIGH);
delay(30);
digitalWrite(LED11, LOW);
delay(30);
digitalWrite(LED09, HIGH);
delay(30);
digitalWrite(LED10, LOW);
delay(30);
digitalWrite(LED08, HIGH);
delay(30);
digitalWrite(LED09, LOW);
delay(30);
digitalWrite(LED07, HIGH);
delay(30);
digitalWrite(LED08, LOW);
delay(30);
digitalWrite(LED06, HIGH);
delay(30);
digitalWrite(LED07, LOW);
delay(30);
digitalWrite(LED05, HIGH);
delay(30);
digitalWrite(LED06, LOW);
delay(30);
digitalWrite(LED04, HIGH);
delay(30);
digitalWrite(LED05, LOW);
delay(30);
digitalWrite(LED03, HIGH);
delay(30);
digitalWrite(LED04, LOW);
delay(30);
digitalWrite(LED02, HIGH);
delay(30);
digitalWrite(LED03, LOW);
delay(30);
digitalWrite(LED01, HIGH);
delay(30);
digitalWrite(LED02, LOW);
delay(30);
digitalWrite(LED01, HIGH);
}
Microcontroller Contest

Participated in the
Microcontroller Contest

LED Contest

Participated in the
LED Contest