Stop Light Ardunio
Build your own stoplight with push-buttons that you can turn each light on and off. Follow each step to build your circuit, download the attached code, to your Arduino and enjoy! Click on the link to view the stop-motion video of the construction of the stop light! https://www.wevideo.com/view/2691645994
Supplies
1 green LED, 1 red LED, 1 yellow LED, 3 push buttons, jumper wires of various sizes (at least 10), breadboard, Arduino UNO, jumper wires to connect to ground and 5v (preferably red and black in color), power cord for Arduino UNO, 6 resistors, Arduino online code editor
Gather Materials
Make sure you have the following items and set them out:
- 1 green LED,
- 1 red LED,
- 1 yellow LED,
- 3 push buttons,
- jumper wires of various sizes (at least 10),
- breadboard,
- Arduino UNO,
- jumper wires to connect to ground and 5v (preferably red and black in color),
- power cord for Arduino UNO,
- 6 resistors,
- Arduino online code editor
Connect Black Wire
Connect one end of the black wire to the negative rail on your breadboard and the other end to GND on your Arduino UNO
Connect Red Wire
Connect one end of the Red wire to the positive rail on your breadboard and the other end to 5v on your Arduino UNO
Connect the Red LED
Connect your red LED to the breadboard using column f, and rows 3 and 4. Make sure your LED's long leg (anode) is on the top and the short leg (cathode) is on the bottom on two different rows!
Add Resistor
Use a resistor to connect to row 4 and the negative rail on your breadboard
Add Jumper Wire
Add a jumper wire from row 3 on the breadboard to port 3 on the Arduino.
Connect Yellow LED
Connect your yellow LED to the breadboard using column f, and rows 7 and 8. Make sure your LED's long leg (anode) is on the top and the short leg (cathode) is on the bottom on two different rows!
Add Resistor
Use a resistor to connect to row 8 and the negative rail on your breadboard
Add Jumper Wire
Add a jumper wire from row 7 on the breadboard to port 4 on the Arduino.
Connect Green LED
Connect your green LED to the breadboard using column f, and rows 11 and 12. Make sure your LED's long leg (anode) is on the top and the short leg (cathode) is on the bottom on two different rows!
Add Resistor
Use a resistor to connect to row 12 and the negative rail on your breadboard
Add Jumper Wire
Add a jumper wire from row 11 on the breadboard to port 5 on the Arduino
Add Buttons
Attach the 3 buttons across the middle of the breadboard (see image) leaving 2 rows of space in between each one.
Add Jumper Wires
Attach 1 short jumper wire from the top row where each button is, respectively, to the positive rail on the breadboard. You should do this 3 times, once for each button.
Add Resistors
Attach one end of a resistor to the bottom row of each button and the other end to the negative rail on the breadboard. You should do this 3 times, once for each button.
Add Jumper Wires
Attach one end of each jumper wire to the same row that you attached the button's resistor. Attach the other end into port 10 for the bottom button, port 11 for the middle button, and port 12 for the top button on the Arduino.
Download Code
Open your Arduino web editor and download this code (attached). You may have to copy and paste the link into a web browser.
Downloads
Connect Arduino to Computer and Upload Sketch
Connect the USB cord to your computer and the other end into the Arduino to give it power and download the code.
Enjoy Your New Stop Light!
Once the code is downloaded, enjoy pushing the buttons and turning on and off each light on your stop light!