Introduction: Arduino Traffic Light

How to build an Arduino based Traffic Light. These are the steps to creating the light with supplies and everything it takes to build it.

The easiest way to get all the materials is to purchase the sparkfun electronics Arduino kit that has all of the needed materials.


1 x Computer with Internet Access
1 x Arduino Uno
1 x USB A/B Cable for connecting the Arduino to your PC
1 x Breadboard (Half-Size, with Voltage Rails)
1 x Red LED
1 x Yellow LED
1 x Green LED
3 x 100 Ohm Resistors (Brown Black Brown)

Step 1: Wire Your LEDs

You’ll need the 3 LEDs from the supply list. Each LED has a place in the breadboard that it will be put in for it to get power. The red LED will be placed in the E5 and F5 places of the breadboard. The yellow will be placed in E10 and F10 and green in E15 and F15.

Step 2: Add Your Resistors to the Breadboard

You’ll need the 3 100 ohm brown black brown resistors. They will each be placed on the same lines as the LEDs. So one resistor will be placed in J5 to the farthest hole on the breadboard and the same go for the others with J10 and J15 to the farthest hole on the board with the negative sign at the top.

Step 3: Then Finally Add Your Wires

Like the resistors, they will be on the same line as the LEDs. Each of the wires will be placed in the A column. For example, one wire will be placed in the A5 spot and A10 and A15 to match up with the LED and the resistor so that the computer knows where to send the power. Also an extra wire is required in order for the lights to work it’s the wire from the GND to the very top right of the board.

Step 4: Set Up Your Code on Arduino

To actually get the light to work you’ll need your working computer and the Arduino coding app on it. First connect your USB cord into the computer and select which port in the Arduino app under the tools drop bar. You’ll need to create the code and tell the computer where to send the power on the board to get the lights to light up. The exact code that works is in the picture above.

Step 5: And Then Hopefully Your Traffic Light Will Work

I ran into several problems when creating this and
If your light doesn’t work the possible problems are:
- Your board might have an issue
- The LEDS might be bent or dysfunctional
- The wires could be broken

This idea was based off of another instructable: