Mario and Minecraft Music Player.

by Gurtez Bhamra in Circuits > Arduino

30 Views, 1 Favorites, 0 Comments

Mario and Minecraft Music Player.

FEX3Z8CMPX8PRQX.jpg

I have created a music player that plays both the original Mario bros theme and the popular Sweden music from minecraft with green and red leds that sync to their respective themes.

Supplies

20260615_141118.jpg

What you need is the following

3 Red Led's (https://www.amazon.ca/OWOFYDR-diffused-Electronic-Component-Indicator/dp/B09B9BYS8V/ref=sr_1_6)

3 Green Led's (https://www.amazon.ca/OWOFYDR-diffused-Electronic-Component-Indicator/dp/B09B9FD3Z3/ref=sr_1_6)

1 Push button (https://www.amazon.ca/C-J-SHOP-Miniature-Momentary-Tactile/dp/B01CGMP9GY/ref=sr_1_9)

6 330 Ohm Resistors (Orange , Orange , Brown) (https://a.co/d/09Qx0BEW)

12 Wires (https://www.amazon.ca/TUOFENG-Hookup-Wires-6-Different-Colored/dp/B0CM2Y7V1Z/ref=sr_1_16)

1 Piezo buzzer (https://a.co/d/09Qx0BEW)

1 Arduino UNO R3 board. (https://a.co/d/0fwujJKy)

1 Solderless Bread Board (https://www.amazon.ca/Breadboard-Solderless-Prototype-Distribution-Connecting/dp/B01EV6LJ7G/ref=sr_1_6)

Connect Ground to the Breadboard and Bridge It.

20260610_122004.jpg

Connect a wire from the gnd slot on your arduino to the top negative rail of your breadboard. after you do that bridge the the negative rail to the bottom by connecting another wire from the top negative rail to the bottom negative rail

Connect Your Buzzer to the Arduino

20260610_122825.jpg

put the buzzer on the breadboard and attach a small wire connecting the buzzer to the top negative rail. After that place a wire to the positive side of the buzzer (the plus sign) and connect it to pin 3.

Connect a Button to the Breadboard

20260610_123201.jpg

Place a push button on the middle of the bread board (the place where the gap is) and on the left row of the button place a resistor on the same column as the button and bridge it using a wire. (Make sure to connect it to the arduino on pin 3)

Place Leds on Your Breadboard and Connect Them to Your Arduino

20260610_124556.jpg

Near your button start by placing a red led and bridge a resistor to the negative side (the short leg) do this process 5 more times by keeping a 1 space gap and changing colors from red to green. after this you will be nearly finished, the final step is to connect the leds to the breadboard.

(Disclaimer you must connect the wire to the anode (the long leg))

Red Led 1 = Pin 9

Red Led 2 = Pin 11

Red Led 3 = A1

Green Led 1 = Pin 10

Green Led 2 = Pin 5

Green Led 3 = A2

The Code

The code incorporates a single button, a buzzer, 3 red LED's, and 3 green LED's. This all is to make a simple music player that play Super Mario Bros for the nes, and Sweden from minecraft. A click of the button pauses the music, while holding it down for 1 second switches the song. Because of the utilization of millis() the Arduino is always alert allowing the user to pause or switch songs without delay.