Traffic Light LED
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
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
Step 4: Finished!
I used a box to decorate
https://youtu.be/brvvxEPYTKc.