Arduino Traffic Light
This project was made with 5mm LEDs and Led Mounting Hardware T1-3/4 Clear Standard to better visualization, and so using 3 LEDs for showing separately its colors Red, Yellow & Green respectively.
Bill of Materials
What you will need:
1 5mm Red LED
1 5mm Yelow LED
1 5mm Green LED
3 Led Mounting Hardware T1-3/4 Clear Standard
1 Arduino Nano
1 Plastic enclosure of 3.2" X 1.6" x 0.8"
1 USB-A to USB-mini Cable
Soldering iron
Solder roll
Rotary drill
Drill bits of 1/4" & 1/2"
Schematic
Look at the schematic so that you can do a good job. Check that you will have to connect Red LED to pin 2, Yellow LED to pin 7 and Green LED to pin 12 from Arduino nano respectively while connecting each other the cathodes of the LEDs and the common connection of those to GND.
Beginning the Project
Use the drill bit of 1/4" so that you can form the front panel of your project by making three holes. You will also have to use the drill bit of 1/2" to make the hole where passing through the USB-A to USB-mini cable.
Installing the LED Mounting Hardwares
Mount the LED Mounting Hardwares by inserting them in the 1/4" holes made previously.
Installing the LEDs
Insert the LEDs into the LED Mounting Hardwares, and solder the cathodes each other of the LEDs.
Placing the Arduino Nano
Place the Arduino nano inside your enclosure and plug in the USB-min connector. Next, insert in it the remaining terminals of the LEDs. Now, it's a good moment so that you can upload the code from www.pastebin.com webpage. Then go to: https://pastebin.com/ZvAKpReP
Join LEDs With Arduino Nano
Solder the the wires previously inserted in the Arduino nano and cut the excess.
Enjoy Your Project
Close your plastic box by using the screws included in the own box and proceed to plug in it to the computer.