Make Music with Maker Pi Pico: Ultrasonic Piano Tutorial

Make Music with Maker Pi Pico: Ultrasonic Piano Tutorial

What if you could play a piano with nothing but the air around you? Imagine the ability to create beautiful melodies by simply moving through space. Join us in this tutorial as we guide you through setting up the ultrasonic sensor, configuring the Neopixel LED, programming the buzzer, and creating musical notes based on distance measurements.

 

Video Tutorial

 

Components Required

Hardware Components

Connection

Connect the Trig pin to GP27 and the Echo pin to GP26.

 

Get Familiar with Thonny and CircuitPython

In this tutorial, we'll use Thonny editor & CircuitPython to build the code for this project. If you're not familiar with Thonny, check out the video below to learn how to get started with it.

 

 

Code

Project complete

This project uses an ultrasonic sensor to detect the distance of an object. Based on the distance, it plays a musical note and changes the color of an LED. It provides a simple and interactive way to create music and visual effects using the distance of objects.