How to use Arduino to make a model traffic light.
For more on using Arduino on a Model Railroad Cilck On Arduino Model Railroad Projects.
This tutorial is part of our series Arduino Projects. There is a video playlist at Playlist
int GREEN = 2;
int YELLOW = 3;
int RED = 4;
int DELAY_GREEN = 5000;
int DELAY_YELLOW = 2000;
int DELAY_RED = 5000;
// basic functions
There are total of 12 LED’s used in this project. Each signal has 3 LED’s (Red, Yellow and Green) connected to it through the 220 ohm resistors. The resistors are used to limit the current that is going to pass through the LED’s. If you won’t use the resistors then the LED’s may burn due to excessive current.
This project is part of our Arduino Tutorial Series Information in this page is summarized from this.