Mini Piano Using Arduino

by thelonelyprogrammer in Circuits > Arduino

3430 Views, 6 Favorites, 0 Comments

Mini Piano Using Arduino

youtube.png

Arduino Tutorial: Mini Piano using Arduino

In this video, I show you how to make a mini piano using Arduino.

Parts and Material

1.jpg

The Parts which we need are :

  • Arduino
  • Piezo Buzzer
  • Push-Buttons - 7
  • Jumper Cables

Connections

2.jpg
Piano.png

The Buttons are connected to Digital Pin 4 to Digital Pin 10 of the Arduino. Each button corresponds to the particular note .i.e C, D, E, F, G, A, B respectively.

The Piezo Buzzer is connected to Digital Pin 11 of the Arduino.

Tinkercad circuit design for this project is given below.

The Code

Code1.png
Code2.png

Before you can start playing your piano, you will need to obtain and install the Tone Arduino library if it is not already installed. This can be downloaded from Github here. If you do not know how to install third-party Arduino libraries in your version of the Arduino IDE, reference this guide on Arduino.cc. Attached below, you will find a zip file that contains the Arduino code for Arduino Piano. Download it and unzip it somewhere on your computer. Open Arduino_Piano.ino in the Arduino IDE and upload the code to your Arduino.

Project Repo: https://github.com/Rahul24-06/Mini-Piano

The Tinkercad circuits allow developing a proof of concept seamlessly without any physical components. Do check the Tinkercad version of this project in the link below.

https://www.tinkercad.com/things/d158sD2m9yX-arduino-piano/editel?sharecode=2XUZYXFkzThGUfCZnJavrtnjtYFHFCII8QY5EKpJUVo

Play!

Arduino Tutorial : Mini Piano

And that's it! You should now be able to tap on the keys and hear the corresponding notes played through the buzzer. If the note isn't accurate, you can adjust the note value in the Arduino sketch to set what value that the pitch is achieved. You can also change the scale that is played by uncommenting one of the few scales included, or make your own scale! If you make your own piano, please comment and show us some pictures and videos. We'd love to see some creative instruments!

If you faced any issues in building this project, feel free to ask me. Please do suggest new projects that you want me to do next.
Share this video if you like.

Blog - https://rahulthelonelyprogrammer.blogspot.in/

Github - https://rahulthelonelyprogrammer.blogspot.in/

Happy to have you subscribed: https://www.youtube.com/c/rahulkhanna24june?sub_confirmation=1

Thanks for reading!