Download presentation
Presentation is loading. Please wait.
1
Project #1 Traffic Light
2
Traffic Light Project You are going to make a traffic light using 12 LED’s a breadboard and the Arduino. You will group 4 Green, 4 Yellow and 4 Red LED’s together on the breadboard you will then use the Arduino to control the length of time for each group just like a real Traffic signal. Here are the times for each set of LED’s. Red light will be on for 30 seconds then Yellow for 4 seconds and then Green will be on for 25 seconds. Now don’t worry I will help get you started on the next slide.
3
Light Set The 4 Red LED’s will between rows 1 and 3. The shorter end or cathode goes in the lower number. For example 1A,2A means the shorter leg (cathode = negative)end goes in 1A and the longer leg (anode = positive)leg goes in 2A. Here is where the LED’s go, (1E,2E),(2D,3D), (1C,2C), (2B,3B). The next set will be (12E,13E) (13D,14D) (12C,13C)) (13B,14B) Next set will be (20E,21E) (21D,22D) (20C,21C) (21B,22B)
4
Light Set Now that you have the LED’s setup the rest is up to you to figure out. Here are some things to remember. 1 You need to have 3 pinModes one for each set of lights. 2 You need to have each set of lights on for a certain amount of time, for this you would use the delay() command. Remember the power from the Arduino which comes from the pins (#3-13) has to go to the Anode (longer leg of LED)or positive side of the LED. The negative side of the LEDS must go to Ground. Gives this some thought and try it out if you cant stuck after your effort call me over.
5
Did You Figure It Out? Give it another shot!!!
6
Reminder of how long each set of lights is on for.
You are going to make a traffic light using 12 LED’s a breadboard and the Arduino. You will group 4 Green, 4 Yellow and 4 Red LED’s together on the breadboard you will then use the Arduino to control the length of time for each group just like a real Traffic signal. Here are the times for each set of LED’s. Red light will be on for 30 seconds then Yellow for 4 seconds and then Green will be on for 25 seconds.
7
Write the Code Now that your board is set up go ahead and write the the code that will control each set of LED’s. You will be graded on how much of the project you do by yourself. For example, Complete project with either 0 or 1 hints from me = 100, 2 hints = 95, 3 hints = 90, 4 hints = 85, 5 hints = 80, more then that you need to review the previous lessons.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.