Additional Parts:
Time to complete: 15 minutes
- 1 Green LED
- 1 Red LED
- 1 Orange LED (I did not have yellow)
- 3 resistors (220 Ohm)
- 1 resistor (1k Ohm)
- 1 Push-to-make switch
Time to complete: 15 minutes

This project introduces the push-to-make (ptm) switch (Actually, the ptm switch was introduced in the last experiment when creating the shield for the high-brightness LED. However, since I did not create the shield for the last project, this is my first encounter with the pmt switch.) and uses it to interrupt a program that makes three LEDs blink like UK-style traffic lights. In UK traffic lights, the order is red, red+yellow, green, yellow, and then back to red. This program would be easy enough to adapt to a US-style light system. In fact, it took about 30 seconds to make the changes to show my children. A picture of the circuit is to the right.
Since I did not have a plethora of colors available in my LED collection, I had use an orange LED instead of a yellow one of similar brightness to the red and green LEDs. I could have tried to increase the brightness of the orange LED by pairing it with a smaller resistor, but honestly, until the project become more difficult, proof of completion is all I'm looking for.
The code for this program is very simple. there is one loop that goes through the light states with a 1000 ms delay after each state. After the delay, the program checks to make sure that the button is pressed before going into the next state. This project is a nice introduction to adding switches to a simple circuit. Below is a video of the completed project.
Since I did not have a plethora of colors available in my LED collection, I had use an orange LED instead of a yellow one of similar brightness to the red and green LEDs. I could have tried to increase the brightness of the orange LED by pairing it with a smaller resistor, but honestly, until the project become more difficult, proof of completion is all I'm looking for.
The code for this program is very simple. there is one loop that goes through the light states with a 1000 ms delay after each state. After the delay, the program checks to make sure that the button is pressed before going into the next state. This project is a nice introduction to adding switches to a simple circuit. Below is a video of the completed project.