Simple Buzzer Music

Introduction: Simple Buzzer Music

About: electrical engineering student

A simple library to output your own songs with the Arduino through a buzzer or speaker.

A small example of the song "praeludium" by Johann Sebastian Bach is included.

Supplies

- 1 x Arduino Uno / Mega / Nano

- 1 x speaker / buzzer

- 2 x jumper wires

- 1 x basic knowledge of music

Step 1: Download the Library

Download the Zip file: music.zip

Source: https://github.com/Lukas0276/Simple-Buzzer-Music/b...

Include the library as shown in the picture.

Navigate to: Downloads\music.zip

Step 2: Open the Basic Example

Go to Examples / Music / Basic

You can also try the praeludium demo "praeludium" (already converted).

Step 3: Convert Your Song

Convert your sheet into tones for the code (as shown in the picture).

If you need more information, just have a look at the praeludium demo for a better understanding.

Step 4: Wire Up the Arduino

Wire the Arduino as shown in the schematic.

Step 5: Upload Your Code

Upload your modified basic code to the Arduino.

(or the praeludium demo)

Step 6: Enjoy Your Music

Thank you for following this tutorial. It was created to improve my understanding of libraries. So feel free to look at the files: music.h, music.cpp and README.txt to get a basic understanding of the library.

If you want to create your own library, just follow this tutorial: https://www.arduino.cc/en/Hacking/LibraryTutorial

If you want to make the whole thing more professional I can recommend this tutorial:

https://www.instructables.com/id/Translate-Songs-...


I hope you learned something. Have fun with the library!

Be the First to Share

    Recommendations

    • Lamps and Lighting Contest

      Lamps and Lighting Contest
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge
    • First Time Author Contest

      First Time Author Contest

    2 Comments

    0
    lukasahrens
    lukasahrens

    Reply 1 year ago

    You're welcome.
    Thank you for your appreciation.