master_pvp77
Published

Easy To Make Traffic Light Simulator For Begginers

This works with any board in the UNO category it is very simple and the code doesn't use a lot of memory

BeginnerProtip322
Easy To Make Traffic Light Simulator For Begginers

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×4
Resistor 220 ohm
Resistor 220 ohm
anything up to 1k ohm works really
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

traffic_light_schematic

Code

traffic_light_code

C/C++
// you can use whatever you want here it doesn't matter 
int green = 10;
int yellow = 8;
int red = 6;

void setup()
{
  pinMode(green, OUTPUT);
  pinMode(yellow, OUTPUT);
  pinMode(red, OUTPUT);
}

void loop()
{
  digitalWrite(green, HIGH);
  delay(20000);
  digitalWrite(yellow, HIGH);
  delay(5000);
  digitalWrite(red, HIGH);
  delay(20000);
}

Credits

master_pvp77
0 projects • 0 followers

Comments