Introduction: The Running Light
Welcome to my first Instructable for my first Arduino project!
Step 1: Materials
-Solderless Breadboard -3mm LEDs x 10(you can use every color you like), 3.2-3.4V
-100-ohm resistors (need 10)
- Breadboard jumper wires (need 31)
Step 2: Breadboard Connections: LEDs
For this project, we'll use a solderless breadboard for ease of assembly. We'll start with the LEDs.
-Starting in whichever column of the breadboard you prefer, connect the anode (longer pin) of each LED in the sequence to Row J on the breadboard. This is the bottom row before the power rail.
-Connect the cathode (shorter pin) to the "-" row of the power rail.
-Connect the rest of the LEDs in a row this same fashion, leaving a little space in between each if you prefer. Because the anode of each LED is in a separate column of the breadboard, it will receive it's own power from a specific pin on the Arduino, allowing individual control. All of the cathodes are connected to the "-" row of the power rail so that they can share a common ground connection back to the Arduino.
Step 3: Breadboard Connections: Resistors
Each LED in the sequence will need a resistor so it doesn't pull too much current and fail catastrophically.
-The closest adequate resistor I have is 100Ω so I used that. Its color code is Brown-Black-Brown-Gold.
-Connect one end of each resistor inline (in the same column) with it's LED, right next to the anode connection.
Step 4: Breadboard Connections: Jumpers
-Use row "A" for one end of each jumper wire that will connect to the Arduino. Make sure each jumper wire is connected to the same column as its corresponding resistor and LED. There should be 10 of these jumpers.
-The 11th jumper connects the cathodes of each LED back to GND on the Arduino. Place one end of this jumper in the "-" row, making sure it is not past the break in the breadboard.
Step 5: Arduino Connections
We will use pins 3-7 and 9-13 on the Arduino to the output voltage to the individual LEDs. For the return, I used the ground pin on the Arduino that is just past pin 13. We are not using pins 0-1 because they are involved in serial communication. Otherwise, the spacing of the connections is fairly arbitrary other than being neatly aligned. You could start by plugging the jumper wires into the Arduino or into row A of the breadboard. I left some small gaps in the breadboard just so the cables weren't too cramped.
Step 6: Put the Code Into the Arduino
you need to put the code I will give you in step 8 into your Arduino
Step 7: Enjoy the Fruits of Your Labor
Step 8: The Code Itself