Traffic lights controller Project

Traffic lights controller Project
In this project, using the Arduino board and various electronic components, we can create a traffic light signal where we can control the blinking effect of the LEDs using the following program:

 // connecting led on pin 8
void setup() 
{
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);  // making pin 8 as OUTPUT pin
}

void loop() 
{
 digitalWrite(8,HIGH);
 digitalWrite(9,LOW);  
 digitalWrite(10,LOW);
 delay(2000);
 digitalWrite(8,LOW);
 digitalWrite(9,HIGH);
 digitalWrite(10,LOW);
 delay(2000);
 digitalWrite(8,LOW);
 digitalWrite(9,LOW);
 digitalWrite(10,HIGH);
  delay(2000);
  
}


4 Likes

Traffic lights 04.mp4 - Google Drive

https://drive.google.com/file/d/1zPG_pu9jgMD1UtwxGlalMBWbgW0mCZgq/view?usp=share_link

These links are for viewing the videos of the traffic light controller

2 Likes

Great going. Next step is to work with four sets of them at a traffic junction, and control them, let us say for 5min, allow traffic in any one direction, while holding the others etc.

What will it be if the crossing is of only 3 roads, etc.

1 Like