Traffic Light Project in Arduino

Adelin
3 min readDec 14, 2021

Task: Design a full traffic light based on a Arduino board

For this project you will need the following parts:

  • 8 Red LED’s
  • 4 Yellow LED’s
  • and 8 Green LED’s
  • 20 220 Ohm resistors
  • 1 Arduino Uno board
  • Connection wires
  • Minimum 2 breadboards to have enough space to implement the project

How to connect the LED’s:

//Traffic Light 1 Pin Connection
//int TrafficColor#=Digital Pin on the arduino board
int carRed_1 = 12;
int carYellow_1 = 11;
int carGreen_1 = 10;
int pedRed_1 = 9;
int pedGreen_1 = 8;

//Traffic Light 2 Pin Connection
//int TrafficColor#=Digital Pin on the arduino board
int carRed_2 = 13;
int carYellow_2 = 7;
int carGreen_2 = 6;
int pedRed_2 = 5;
int pedGreen_2 = 4;

The basic scheme of the main traffic light:

Short note: Ped_Green_1, Car_Yellow_1 and 2…reffers to the 2 main arteries that intersect with each other and in order to have a traffic light for the other parts of the intersection we will add a copy of the 2 main lights on the opposite sides. You will se in the next capture

In this capture we connected the traffic lights of the two main parts (bottom & right side) to their mirror counterparts on the other side (top linked to bottom & right linked to left)

//Traffic Light 1 Pin Connection
//int TrafficColor#=Digital Pin on the arduino board
int carRed_1 = 12;
int carYellow_1 = 11;
int carGreen_1 = 10;
int pedRed_1 = 9;
int pedGreen_1 = 8;
Adelin

⛥Passionate about technology, innovation,programming, IT&C ⛥interested in self development