LED Traffic Light

by noyachen in Circuits > Arduino

158 Views, 0 Favorites, 0 Comments

LED Traffic Light

IMG_7617 (1).jpeg

This project is basically about teaching kids to recognize different traffic lights. This project is done by using LED to create 3 different colors of light which is the same color as the traffic light. By having words introduced to the different colors of light on the LED light bulbs, the children can learn about different uses of the light bulb. The yellow light will be very short as it is in real life which can let children know what can actually happen. This can let the children be aware when they are on the road. This learning product can benefit children by their safety, the idea of traffic should be taught to children to let them be good citizens and also protect themselves when they are outside. The product will continue to repeat at the same pace until the children know about the ideas of traffic lights.

Source from: https://www.instructables.com/Arduino-LED-Traffic-Light/

Supplies

- Jumper Wire (3)

- Arduino Leonardo (1)

- LED Light Bulbs (Green, Yellow, Red)

- Resistance (3)

- Bread Board (1)

- USB Cable for Arduino (1)

Prepare Materials

IMG_7618 (1).jpeg

Prepare all the materials needed in the list above.

Type in the Code

截圖 2021-04-13 下午1.27.33.png

void setup() {

pinMode(12, OUTPUT);

pinMode(11, OUTPUT);

pinMode(10, OUTPUT);

} void loop() {

digitalWrite(12, HIGH);

digitalWrite(11, LOW);

digitalWrite(10, LOW);

delay(5000);

digitalWrite(12, LOW);

digitalWrite(11, HIGH);

digitalWrite(10, LOW);

delay(1500);

digitalWrite(12, LOW);

digitalWrite(11, LOW);

digitalWrite(10, HIGH);

delay(7000);

digitalWrite(12, LOW);

digitalWrite(11, LOW);

digitalWrite(10, LOW);

}

Code: https://create.arduino.cc/editor/noyachen0721/767e...

Complete the Circus

IMG_7617 (1).jpeg

1. Connect a Jumper Wire to GND and negative

2. Connect d12 to the positive of a green LED light bulb by a jumper wire

3. Connect d11 to the positive of a yellow LED light bulb by a jumper wire

4. Connect d10 to the positive of a red LED light bulb by a jumper wire

5. Use resistance to connect the negative of the light bulb to the negative of the breadboard

6. Connect the computer and the board with a USB cable

Final Product

LED Traffic Light

This is the final product of the LED Traffic Light.