Skip to content

Project 1.4.4: TRAFFIC LIGHT YELLOW ONLY BLINK

Description This is where you get to know how to make the yellow LED blink.
Use case Programming the yellow light on the traffic light to blink which could be used to tell that the traffic light is on standby mode. This tell drivers to be cautious. Such is mostly seen on traffic lights that’s normally at areas with lower traffic volume.

Components (Things You will need)

Traffic light module Arduino Uno Arduino USB Cable Breadboard Jumper Wires

Building the circuit

Things Needed:

  • Arduino Uno = 1
  • Arduino USB cable = 1
  • Traffic light module = 1
  • Yellow jumper wires = 1
  • White jumper wire= 1

Mounting the component on the breadboard

Step 1: Place the traffic light module on the breadboard.

step 2:Connect the G pin of the traffic light module to pin 6 on the Arduino Uno using a jumper wire.

step 3:Connect the GND pin of the traffic light module to GND on the Arduino Uno.

step 4:After wiring, connect the Arduino Uno to the computer using the USB cable.

Trafic Light fixed on breadboard.

PROGRAMMING

Step 1: Open your Arduino IDE. See how to set up here: Getting Started.

Step 2: Type const int yellow = 6; before the void setup function.

Pinmode decalration.

Step 3: Type the following codes in the void setup function as shown below;

pinMode (yellow, OUTPUT);

Trafic pinMode.

Step 4: Type the following codes in the void loop function as shown below;

digitalWrite (yellow, HIGH);

Truning On the Trafic ligth .

The digitalWrite () function controls the state of the pin. The pin can either be HIGH or LOW. The HIGH state turns on the LED. As a result, the code below turns on the LED.

Step 5: Now, let's introduce a delay by typing delay(400); exactly as shown in the image below. Truning OFF the Trafic ligth .

Step 6: : Type digitalWrite (yellow, LOW); exactly as shown in the image below. Truning OFF the Trafic ligth .

Step 7: Now, let's finish up with a delay by typing delay(400); exactly as shown in the image below. Truning OFF the Trafic ligth .

Uploading the code

Step 1: Save your code. See the Getting Started section

Step 2: Select the arduino board and port See the Getting Started section:Selecting Arduino Board Type and Uploading your code.

Step 3: Upload your code. See the Getting Started section:Selecting Arduino Board Type and Uploading your code

OBSERVATION

When the circuit is functioning, observe the yellow LED of the tgrafic blinking light as expected. This indicates that the LED is receiving the signal correctly from the Arduino and is operating as intended.

CONCLUSION

In summary, the project involving a blinking yellow light within a simulated traffic light system introduces participants to controlled visual signaling. By programming the yellow LED to blink, participants gain insights into timing control, code logic, and the role of dynamic signaling. This endeavor serves as a pivotal step in electronics education, showcasing the concept of rhythmic visual cues and igniting curiosity about practical applications, such as cautionary signals and automation.