Welcome to Kerala Project Center.

Traffic Light Simulator

Traffic Light Simulator

This simple little project uses an Arduino and some LEDs to replicate a traffic light. It uses code as an internal timer and continues to run until you cut the Arduino's power supply.The LED have been powered by Arduino UNO (Board). It contains a code which uploaded to the board. And once it simulated LED Start's blinking like a traffic light.

Components




Arduino Uno
Breadboard
Jumper Wires
LED (Red , Green , Yellow)
Resistor 100 Ohm


Components Hexkart Flipkart
Arduino Buy Now Buy Now
Bread Board Buy Now Buy Now




Arduino



Arduino is an open source electronic prototyping platform.Arduino board designs use a variety of microprocessors and controllers. The boards are equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards ('shields') or breadboards (for prototyping) and other circuits. The boards feature serial communications interfaces, including Universal Serial Bus (USB) on some models, which are also used for loading programs. The microcontrollers can be programmed using the C and C++ programming languages, using a standard API which is also known as the Arduino language, inspired by the Processing language and used with a modified version of the Processing IDE.



Circuit Diagram



Arduino Code


int GREEN = 2;
int YELLOW = 3;
int RED = 4;
int DELAY_GREEN = 5000;
int DELAY_YELLOW = 2000;
int DELAY_RED = 5000;
// basic functions
void setup()
{
pinMode(GREEN, OUTPUT);
pinMode(YELLOW, OUTPUT);
pinMode(RED, OUTPUT);
}
void loop()
{
green_light();
delay(DELAY_GREEN);
yellow_light();
delay(DELAY_YELLOW);
red_light();
delay(DELAY_RED);
}
void green_light()
{
digitalWrite(GREEN, HIGH);
digitalWrite(YELLOW, LOW);
digitalWrite(RED, LOW);
}
void yellow_light()
{
digitalWrite(GREEN, LOW);
digitalWrite(YELLOW, HIGH);
digitalWrite(RED, LOW);
}
void red_light()
{
digitalWrite(GREEN, LOW);
digitalWrite(YELLOW, LOW);
digitalWrite(RED, HIGH);
}




Hours

Monday - Saturday: 9:00 AM - 5:00 PM
Sunday: Not Working

Location

Door No. 510, Samastha Jubilee Memorial Soudham,
Mele thampanoor, Trivandrum, Kerala – 695001

Book Now

+91 9633118080