Hot Crust Buns

by bdstroinski675 in Circuits > Arduino

216 Views, 0 Favorites, 0 Comments

Hot Crust Buns

20200524_104604.jpg

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

Screen Shot 2020-05-24 at 11.07.22 AM.png

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)

Screen Shot 2020-05-24 at 11.23.54 AM.png

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

20200524_112631.jpg

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!

20200524_114326.jpg

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

Mary Had a Little Lamb

Here is me playing Mary had a Little Lamb.