This project uses the Arduino Uno, a buzzer, and a button to play the song Happy Birthday! When the button is pushed the buzzer plays the entire song of Happy Birthday. I see the connection to the musical birthday cards that my children love so much.
I chose to create this project because when I completed my first project using a buzzer it did not include a button and played a very simple pattern. I had used buttons to light LEDs in the past so I decided to add a button to the buzzer and also create the song Happy Birthday as a surprise for my son's 5th birthday! He loved it and played over and over! As kids always do he loved pushing the button. The hardest part of this project was creating from scratch the code for the song happy birthday but it was fun to see how coding can connect to other subjects such as writing music.
Skill Level: Beginner
Inspiration credited to:
Kilic, M. (2016, November 24). Button buzzer melody. Retrieved from http://mertarduinotutorial.blogspot.com.tr/2016/11/buzzer-button-melody.html
Materials
Now we are ready to get the code for your project. Go the following link and copy the code into your Arduino editor.
Code to take note of: