Sound Traffic Light

Introduction: Sound Traffic Light

It is a traffic light that will make sound when the traffic light change. I use to connect with Arduino.

Step 1: Step1: What Should You Prepare

Arduino Uno

Breadboard

Switch

Resistors(3)

Connecting wires(11)

Red LED

Green LED

Yellow LED

Sounder

Step 2: Step 2: Improve the Features

My improved website: https://www.instructables.com/id/Arduino-Traffic-...

Before I change:

The Led change in green, yellow and red.

After I change:

Number of seconds per

Each light is changed, the first two second make sound

Step 3: Step3: Steps to Follow

Traffic light are use to make people know can they go? It use on the road and it is using to make people safe and walking without accident.

The traffic lights will give instructions to the drivers and pedestrians. From showing the standard color. The three colors generally used in traffic lights are Red, Yellow and Green.

This Arduino Traffic Light is make of connect each LED to digital pins ten, nine, eight. I add the traffic light with sound. The sounder is connect to pin three. When green light high, it will make the sound. When the yellow light shows, the green light lows; than it also making sound in first two second. It will be a cycle. The red light also shows, the yellow light low. It will also be sound in first two second.

Step 4: Step4: Run a Program

Programming code: https://create.arduino.cc/editor/Sophie1357/4662a...

void setup(){ // put your setup code here, to run once:

pinMode( 8 , OUTPUT); // sets the digital pin as output

pinMode( 9 , OUTPUT); // sets the digital pin as output

pinMode( 10 , OUTPUT); // sets the digital pin as output

}

void loop(){ // put your main code here, to run repeatedly:

digitalWrite( 8 , HIGH ); // sets the digital pin on/off

tone(3, 440, 2000); //改buzzer or speaker frequency

delay( 8000 ); // waits a few milliseconds

digitalWrite( 8 , LOW ); // sets the digital pin on/off

digitalWrite( 9 , HIGH ); // sets the digital pin on/off

tone(3, 440, 2000); //改buzzer or speaker frequency

delay( 4000 ); // waits a few milliseconds

digitalWrite( 9 , LOW ); // sets the digital pin on/off

digitalWrite( 10 , HIGH ); // sets the digital pin on/off

tone(3, 440, 2000); //改buzzer or speaker frequency

delay( 5000 ); // waits a few milliseconds

digitalWrite( 10 , LOW ); // sets the digital pin on/off

}

Step 5: Step4: the Sound Traffic Light

It is a video that shows the making progress, step and how it runs

please click here

Be the First to Share

    Recommendations

    • Maps Challenge

      Maps Challenge
    • Make it Fly Challenge

      Make it Fly Challenge
    • DIY Summer Camp Contest

      DIY Summer Camp Contest

    Comments