Close menu

Resources


PIPER COMPUTER

Everything you need to teach STEAM effectivly using the Piper Computer Kit.

Educator Guides StoryMode Project Guides PiperCode Project Guides
PIPER MAKE

Teach fundamental STEM skills while providing a bridge to career connected learning.

Educator Guides
Best Practices Standards Glossary FAQ Educator Forum

EDUCATOR PORTAL

Close menu

ALL GUIDES


StoryMode

  1. Mars
  2. Cheeseteroid
  3. Treasure Hunt
  4. Chain Reaction
  5. Power Plant
  6. Rainbow Bridge
  7. Funky Fungi
  8. Breadboard Bluffs
  9. Return to the Cheeseteroid

  1. Pip Hop
  2. Bot Builder

  1. Ring Race
  2. Snake Trap
  3. Dark Maze
  4. Explosive Escape
  5. Chest Quest

PiperCode

  1. Blink
  2. Stop Light
  3. Light Show
  4. Tally
  5. Siren
  6. Circuit Design
  7. Debug
  8. Frog Frenzy

  1. Color Coded
  2. Ther-Mood-Stat
  3. Security Zone

  1. Randomizer
  2. El Pangolin (Simon)
  3. Beat the Buzzer
  4. 5-Button Synthesizer

PIPER COMPUTER

PROJECT GUIDES


YOU ARE HERE

PiperCode

Project 2 of 8

PiperCode Project 2 of 11

Stoplight


Beginner

30 Mins

Grades 3 - 8

Look for the graphic above
to launch the project
INTRODUCTION

Learn the basics of the program editor and programming

In this project, students build three LED lights and program them to light up in a sequential order similar to a traffic stoplight. The step-by-step instructions in the tutorial guide students through the process of building the circuit and writing the code.

PROJECT MATERIALS

Piper Computer Kit
3 LEDs (red, yellow, green)
6 Wires
Breadboard

PROJECT RESOURCES

Concepts

In this project, students will expand their understanding of the concept of sequences in loops by creating code to make three LEDs turn on and off in a repeat forever loop. They will then stretch to form algorithms and automation, while practicing testing and debugging.

Extension: Challenge the students to modify the code so that the lights blink in a different order, or stay on longer.

Troubleshooting Tips

  • Similar to Blink, most students will make mistakes with the pin numbers or with selecting ON and OFF. Note that a stoplight goes from red to green to yellow (pins 22, 26, 24). This is a different order than the LEDs are wired in the GPIO and may at first cause confusion. However, with this exercise they learn that they can change the sequence of the code to fit the function, and don’t have to follow the sequence of the wiring.
  • Also the difference in wait time causes the LEDs to remain on for different amounts of time. Students are instructed to change these times to make their city safer. This is relating the code to a real world situation. They can discuss why one light is on for a longer period of time than another in a stop light.

Our customer support specialists are on hand to ensure your implementation of Piper runs seamlessly.
View Support Docs or Contact Support
PROJECT STEPS

Step 1 Get your stuff!

Take out the inventory you see in the picture below.

Step 2 Wire your LEDs

Build your electronics! Connect LEDs to the breadboard and wires to the GPIO pins on the Raspberry Pi.

GPIO Setup RED LED Pins: 39, 37
Yellow LED Pins: 35, 33
Green LED Pins: 31, 29

Step 3 Start programming!

Drag BLOCKS to match the image. Change both Turn Pin numbers to 37 and the second Turn Pin block to OFF. Click Start.

Step 4 Repeat for other LEDs

Click Stop. Drag blocks and change the Turn Pin numbers to match the image above. Click Start.

Step 5 Plan for traffic

Click Stop. Change the Wait time so traffic in your city is safe!

Completed!