Traffic Light LED

by chloesheu in Circuits > Arduino

150 Views, 0 Favorites, 0 Comments

Traffic Light LED

Screen Shot 2020-04-14 at 2.36.33 PM.png

Originated from: https://www.makeuseof.com/tag/arduino-traffic-ligh...

The Arduino Traffic Light is a fast, easy, and fun project that could be done less than an hour.

Changes made:

- Button

The original project is that it would just keeping changing lights without a button. I changed it to if you press the button the LED lights will turn on.

- One button for 1 light

I installed 3 buttons, one for each color. Each button controls one color, so when you want to use a color you won't need to wait, instead you could just press the button.

Step 1: Materials

Prepare the materials

-Breadboard x1

-Yellow x1, Green x1, Red x1 LEDs

- Connecting Wires

- Push buttons x3

- 220-ohm resistors x3

- 10k-ohm resistor x3

Step 2: Building

Screen Shot 2020-04-15 at 7.03.40 PM.png
Screen Shot 2020-04-15 at 10.32.07 PM.png
Screen Shot 2020-04-15 at 10.32.01 PM.png
Screen Shot 2020-04-15 at 10.31.35 PM.png
Screen Shot 2020-04-15 at 10.31.24 PM.png

Connect the wires with the push buttons and LEDs.

1. Connect the anode of LED to pin numbers 8,9,10 then connect the cathodes to the board shown in photo #2 and #3

2. Connect the wires to the LEDs

3. Repeat the same same steps times

3. Connect wires to the button in order to control the LEDs shown in photo #3 and #4

4. Repeat the same step for two times so each LED gets a button

Step 3: Upload

KakaoTalk_Photo_2020-04-14-21-30-26.jpeg

Connect and upload

The Code is the link below

https://create.arduino.cc/editor/chloesheu/a8f2e1b...

Step 4: Finished!

Screen Shot 2020-04-15 at 6.49.27 PM.png

I used a box to decorate

https://youtu.be/brvvxEPYTKc.