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 Extra

PiperCode Project Extra

5-Button Synthesizer


Intermediate

30 Mins

Grades 3 - 8

Look for the graphic above
to launch the project
INTRODUCTION

Do, Re, Mi, Fa, So -- Make your five button synth using your buttons!

Make music using PiperCode. In this project, we will make a five-button synthesizer using PiperCode and the components in a Piper Computer Kit.

PROJECT MATERIALS

Piper Computer Kit
10 Wires (2 yellow, 2 green, 2 red, 2 blue, 2 black)
5 Buttons
Breadboard

PROJECT RESOURCES

Concepts

Students can have fun making music in this STEAM project which they can further explore how the ground in circuits is the common return path for a current (like a direct physical connection to earth) plus being a reference point from which voltages are measured.

Troubleshooting Tips

  • If no sound is playing, check your wiring, code blocks and speaker volume
  • The Raspberry Pi may turn off if a short circuit occurs between its ground and high-voltage GPIO pin to avoid head damage.
  • Confused which GPIO pin to use? Don’t forget that there is a electronics tab which identifies each pin number. On that diagram, ground pins are outlined in black and multipurpose pins in grey.
  • Don’t hear any sound playing? You can check the volume wheel on the side of your Piper Computer (where the speaker sits), or in the software settings there is a sound option.
  • Don’t forget you can duplicate blocks by right licking and selecting ‘duplicate’ in the menu!
  • You can choose different instruments or tones for each button, like keys on a keyboard! Using the selection menu in the synth blocks, try putting together your own set of notes.

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 image below.

Step 2 Start setting up

Next, set up your keyboard by placing the buttons on the breadboard like you see in the image below.

Step 3 Wire Up Buttons

Plug in the buttons and match the wires with pins.

(Note: The Raspberry Pi may turn off if a short circuit occurs between its ground and high-voltage GPIO pin to avoid head damage.)
GPIO Setup Green Button: 3, 21
Red Button: 26, 6
Blue Button: 31, 11
Yellow Button: 33, 14
Black Button: 16, 36

Step 4 Let's start coding

Now that your buttons are wired up, time to start coding! Open PiperCode and set it to Step Mode at the highest speed.

From the Sound menu on the left side, select the “Play” block. Drag and drop it into the programming area.

Next, find the "Synth" block under Sound and place it inside of the play block as shown below. Using the block’s dropdown menu to adjust tone, choose a sound that you’d like the leftmost button on your breadboard to play.

Run your code by clicking the “Start” button in the top left corner.
(Note: A sound should play from your Piper Computer Kit’s speaker. If not, check your wiring and code using the steps above.)

Step 5 Link the chosen sound

Now, let’s link our chosen sound to the leftmost button. From the Chip Menu, grab a “When pin turns on” block. Leave the pin value as 3 - the green button’s signal pin.

Next, click “Start” to test your code. Make sure your speaker volume is turned up. A sound should play when the green button is pressed. Try it!

We will now add a second sound corresponding to the second button. To do this, repeat the same steps as before, but set the pin to 26 this time as shown below.

Now that we understand how to code a button press to produce a sound, we can use the “Duplicate code” action to make copies of the code so far. To duplicate the code, right click on a completed “When pin turns on” block, and select duplicate. Do this three times until you have 5 "When pin turns on" segments.

After duplicating your code, give each statement a new pin assignment. On the new “When pin turns on” blocks, set their pin numbers to 31, 33, and 16 as shown below.

Step 6 Play your synthesizer!

Now, you can choose different instruments or tones for each button, like keys on a keyboard! Using the selection menu in the synth blocks, try putting together your own set of notes.

Once you're finished, click "Start" again and play your 5-button piano by pressing your buttons. Experiment with your piano by changing the sounds. The combinations you can create are nearly endless!

Completed!