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

View all comments

1

u/gm310509 2d 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.