Hot Crust Buns
Do you want a fun new way to play basic songs on your breadboard? Learn how to play classic songs like Mary had a Little Lamb, or Hot Crust Buns. In this lesson, you will learn how to set up and code a musical instrument with 4 notes. Some coding experience would be beneficial, but you by no means need to be an expert to complete this experiment.
Supplies
The materials you'll need is Arduino Create software, an Arduino Uno board or SparkFun RedBoard, 4 push buttons, a buzzer pin, LED light, 1 330Ω Resistor, and 4 10K Resistors, and 15 jumper cables.
Attach Buttons
Attach the push buttons as displayed in this sketch from tinkercard. Make sure you use the 10K resistors for the buttons.
Attach Outputs (LED and Buzzer)
Attach the Piezo buzzer and LED light as shown on this tinker card. Remember, the anode is tall and positive, the cathode is short and negative. If you want to use the code that I've made, ensure that all of your input/outputs are going to the proper terminals on the circuit board.
Code
The final product should look like this. I've also attached the code I used with explanations of why I made each choice I did.
Follow this link! https://create.arduino.cc/editor/bstroinski/d2739...
Play!
To play Hot Crust Buns it goes
Green, Blue, Yellow, Green, Blue, Yellow, Yellow X4, Blue X4, Green, Blue, Yellow
Mary had a Little Lamb
G, B, Y, B, G, G, G, B, B, B, G, R, R, G, B, Y, B, G, G, G, G, B, B, G, B, Y
Example
Here is me playing Mary had a Little Lamb.