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 5 of 8

PiperCode Project 5 of 11

Siren


Intermediate

30 Mins

Grade 3 - 8

Look for the graphic above
to launch the project
INTRODUCTION

Sound the alarm! Learn how to make lights and sounds

In this project students use both lights and sound to recreate their own version of a police car siren. The step-by-step instructions in the tutorial guide students through the process of building the circuit and writing the code. To make this an interactive game, challenge students to borrow code from other projects. What happens when the button is pressed?

PROJECT MATERIALS

Piper Computer Kit
2 LEDs (red, blue)
Push Button
5 Wires (2 red, 2 blue, 1 yellow)

PROJECT RESOURCES

Concepts

In this project, students will learn how to use columns of the breadboard to provide a ground connection to two LED lights with one wire. The short sides of both LED's are placed in the same column as the Blue jumper wire, meaning they are both connected to it.

This is the first project where we introduce events, a key programming skill. All components of the event block will play when you push the button! The event is activated by an input from Pin 8 which is connected to the push button. The code block When Pin eight turns On is creating the event and all code blocks inserted inside it will occur when the button is pushed. An example of playing music is provided as blocks to add inside the event, but students should be encouraged to try other things such as flashing lights, or playing different sounds.

Other key skills used in this project are sounds, timer and sequences.

Troubleshooting Tips

  • The ‘wee’ and ‘woo’ sounds are in theSynth go1 block. In order to get the ‘wee’ and ‘woo’ synth sounds, make sure to use the drop down menu. Students may have difficulty embedding code blocks with the ‘repeat do’ and ‘When pin eight turns on’. It is important that they learn to drag the blocks inside the loops.
  • Students can experiment with other blocks to see what other events they can cause to happen when the button is pressed and Pin 8turns on. The ‘event’ occurs because the code blocks are separated. Do not link the code blocks for ‘When pin 8 turns on’ with the ‘repeat forever’ loop blocks.
  • Extensions: To change how the lights blink, as in other projects, students may add wait times between turning the LED’s On and Off.
  • Another event could happen when pin 8 turns off.
  • Another button could be added to the circuit and an ‘event’ created when it turns on.

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 Build some lights

Set up a couple of lights to blink. They can share the ground wire (short side).

GPIO Setup Red LED Pins: 40, 34
Blue LED Pins: 34, 32

Step 2 Blink Blink

Add this code to get those lights blinking.

Step 3 Add an event

Add the Pin Turns On event, and set it to pin 26.

Step 4 Add the button

Connect our event button to pin 26 & 30.

GPIO Setup Push Button: 30, 26

Step 5 Add sounds

Anything in the event block will play when you push the button. Try sounds!

Completed!