
Step1 STEM
Bonus CHALLENGE!
At this point you have learned how to blink a RED and GREEN LED back and forth. You also know how to use delays in your code to make your program wait to do something else. Pulling all of this knowledge together, see if you can accomplish the following bonus challenge!
-
Create a simple traffic light
Keep in mind how a traffic light works. Here is the pattern to help you in your solution. A traffic light will go through this pattern and then repeat itself over and over:
RED light for 5 seconds
GREEN light for 5 seconds
YELLOW light for 2 seconds
Start over with RED light again and repeat pattern
HINT: your STEM1 project kit comes with a spare YELLOW LED. You will need that to complete this bonus challenge since traffic lights are made up of RED, YELLOW and GREEN lights.
You will first need to create the circuit on your breadboard and then you will need to write the code and upload it to your Arduino to test it all out!
GOOD LUCK!
Don’t worry if you don’t figure it out right away and things don’t work. Remember, we learn best by failure and trying new things! If you get stuck, or just want to see the answer, both the completed circuit and the code are linked below to help you out.