Week 6: Raspberry PI Music Box

Introduction:

This project will show you how to wire up buttons to your Raspberry Pi’s GPIO pins and then use them to play sounds with a simple Python application.


Parts Needed:
You will need the following parts:
⦁ 1x Breadboard
⦁ 1x Raspberry Pi
⦁ 4x Push Buttons
⦁ 4x 330 Ω or 220 Ω Resistors
⦁ 9x Jumper Wires
⦁ Hardware Hookup
Ready to start hooking everything up?

What you will learn
By creating a GPIO music box with your Raspberry Pi you will learn how to:
⦁ Learn how Sound Blocks work in Scratch
⦁ Connect a button to the GPIO pins on a Raspberry Pi

Circuit Diagram:
Connect the top right pin of the Push Button to Ground on the breadboard.
Connect the bottom right pin to ground on the breadboard using a resistor.
Connect the bottom left Pin to the correct GPIO port. (Push Button 1 to GPIO 2, Push Button 2 to GPIO 3, Push Button 3 to GPIO 4, and Push Button 4 to GPIO 5).
Connect Ground on the breadboard to Ground on the Raspberry PI.

Programming Code: