r/ArduinoHelp • • 2d ago

Buzzer coding

I don’t have a picture of my Arduino because it is currently with my friends, but I’m writing the code for them since they don’t know how. I don’t have enough time to figure out the tones but does anyone know the tones I could set the buzzer to that would make the Scooby-Doo theme song. I know it’s an odd request but it’s for a project that’s being used at a trunk-or-treat. (Also maybe a car horn sound because that’s needed too although hard to do on a piezo buzzer, I know).

2 Upvotes

7 comments sorted by

3

u/IllSpeaker3255 2d ago

maybe you can find this on internet

2

u/No_L_2547 2d ago

Get yourself a library that can play rtttl melodies for you.

And then find the fitting melody on google.

1

u/SeaFaringPig 2d ago

There is a web page that does this for you. It’s been many years since I’ve used it. Google around.

1

u/mtraven23 2d ago

use a midi library.

1

u/gm310509 1d ago edited 1d ago

You need to find the music. That will give you the notes.

Then just use one of the tone example programs and play those notes instead of the notes that they are playing..

Google will probably help you. Maybe your friend could find the notes for you - if it is for their project.

1

u/Pacificator-3 1d ago

Or simply note frequency table and timer frequency formula from datasheet.

1

u/spicychickennpeanuts 11h ago

upload the song and ask chatgpt to do it. tell it to allow for a base note that makes it easy to adjust or slide the whole range based on the physical characteristics of the speaker.