Inspiration
I was inspired to build this as I wanted to do something musical for my project. I came up with ideas to build a capacitive touch piano and a bluetooth piano and ended up going with the bluetooth piano as the components were easily available.
What it does
It plays all the white key notes from C3 to C4 using the ToneAC arduino library. The piano buttons are part of one circuit and speaker is part of a different circuit. If the circuits were made on two breadboards, you could play the piano from across the room.
How I built it
I used push buttons for the keys and connected it to an arduino board. The arduino board was also connected to a Master bluetooth HCO5. The second circuit consisted of a speaker and the receiver HCO5 connected to a different arduino board. The code used the SoftwareSerial library to transmit signals between the bluetooth modules.
Challenges I ran into
Pairing the bluetooth modules was challenging and new. One of the biggest challenges for the code was to have it play the note and sustain it as long as it was pressed rather than play repeatedly as it received the bluetooth signal and switch to a different note when another button was pressed.
Accomplishments that I'm proud of
I'm quite happy with the consistency of low latency in the button press and the sounding of the note.
What I learned
Through this project I learned how to use the internal resistance of the arduino boards. I also learned how to pair bluetooth modules and how to make use of different libraries. I was able to learn more about different hardware components and circuit building.
What's next for Bluetooth Piano
The piano could be improved in a few different ways. One of these would be to add the missing sharp/flat notes (black keys on a standard piano). The piano range could also be extended by adding more notes in different octaves. A third a more complex addition could be to make the piano capable of playing multiple notes simultaneously for chords which could be achieved by using more than one speaker or using an algorithm to superimpose the frequency waves.
Log in or sign up for Devpost to join the conversation.