Welcome to the next tutorial of our Raspberry Pi programming course. In our previous tutorial, we learned how to create a timelapse video with still images and understand how phototimer and FFmpeg work. In this lesson, you'll make a button-controlled "music box" that plays different sounds depending on which buttons are pressed.
What you will learn
Connect button pushes to function calls using the Python gpiozero package and uses the Python dictionary data structure
Components
Raspberry Pi
Breadboard
Buttons
Jumper wires
Speaker
Set up your project
For this project, you'll need ...