Dark Matters
  • About Me
  • Publications
  • Educational Resources
  • Blog
  • Other Interests

Arduino Report #4: Project 5--Model Traffic Signal

1/26/2013

0 Comments

 
Additional Parts:
  1. 1 Green LED
  2. 1 Red LED
  3. 1 Orange LED (I did not have yellow)
  4. 3 resistors  (220 Ohm) 
  5. 1 resistor (1k Ohm)
  6. 1 Push-to-make switch

Time to complete: 15 minutes
Picture
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.

0 Comments



Leave a Reply.

    Archives

    July 2015
    February 2014
    November 2013
    October 2013
    September 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013

    Categories

    All
    Arduino
    Chess
    Lightsaber
    Math
    Probability
    Projects
    Python
    Raspberry Pi
    Robotics
    Statistics

    The Great Arduino Project

    RSS Feed

Powered by Create your own unique website with customizable templates.