Piperbot and Pip are dealing with an intergalactic traffic jam! In this mission, students will build a series of LEDs and program them to light up in specified ways, introducing hardware inputs and outputs and coded elements like time delays, sequential triggers, and code loops.
Students will create programs that use variables to store and modify data (CSTA 1B-AP-09)
Students will test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended (CSTA 1B-AP-15)
Students will build knowledge by actively exploring real-world issues and problems, developing ideas and theories, and pursuing answers and solutions (ISTE 1.3.d)
I WILL BE ABLE TO...
Build a sequence of 3 LEDs
Code my own traffic light
Learning Activities
Extension: Traffic Light PCBA Challenge
In this challenge, students will understand how to take a prototype (their traffic light) and turn it into a product that can be used in the real world. In this challenge students will learn about Printed Circuit Board Assembly or PCBA. Instructions are in the make.playpiper.com tutorial that may be accessed on the final step of the Mission Traffic Light or by clicking the SHOW ALL button on the Expedition Teleport Menu then selecting the TRAFFIC LIGHT PCBA Mission.
Have an different version? Look for more information on the Support Page.
Troubleshooting Tips
Is the LED failing to light up when you hit START?
The most common issue is that the LEDs may be plugged in incorrectly. Be sure the anode and cathode (i.e., short and long sides of LEDs) are oriented correctly, according to the tutorial.
Ensure that you’ve plugged the wires into the right GPIO. Look at the Digital View to see which pin you’re affecting.
Our customer support specialists are on hand to ensure your implementation of Piper runs seamlessly. View Support Docs or Contact Support
EXPANDED RESOURCES
Term Glossary
Ground Pin A ground pin is a connection point in an electronic circuit that provides a common return path for electrical current. It helps complete the circuit by allowing excess electricity to flow safely away, which helps prevent damage to the circuit and keep everything working correctly.
Loop A part of a computer program that repeats a chunk of code a specified number of times or while a condition is true.
Boolean A type of data or expression with two possible values: true and false.
Mini buttons are types of momentary switches that only remain in their state as long as they're being actuated (pressed or held down). Pressing down on the button will close the circuit, letting the microcontroller know that current can pass through the circuit. When you let go of the button, the circuit opens back up letting the microcontroller know to stop allowing current to flow through the circuit. Most often momentary switches are best used for intermittent user-input cases like mode buttons for controllers because they are so easy to press or "click".
This button has two terminals which means it can only connect to a single input (connected by Jumper wire to a GPIO pin on a microcontroller) and a single output (connected by Jumper wire to a ground pin on a microcontroller). These work well as simple on/off circuits for one conducting loop.