Introduction: Super Mario Using Buzzer
Listening music relax our mind and soul. Lets add some music to your arduino projects using a single component , buzzer.
I found this awesome project using Buzzer which play super mario theme song written by Dipto Pratyaksa on instructables. In addition to old project, i used a potentiometer to stop the buzzer in between the tone is playing on loop. I have connected buzzer at Pin 13 so i have made code according to it .
Step 1: Components Required
Step 2: Circuit Schematic
Pin 13 --> buzzer
A0 --> wiper
5V --> terminal 1 of potentiometer
GND --> terminal 3 of potentiometer , negative of buzzer
Step 3: Arduino Code
This code is a lengthy code and it will work with potentiometer only as i have made this code according to my project.
Note: - we cannot use potentiometer in this project to change volume of song as we have already fixed the tone inside the code . for changing the volume we can use audio amplification module.