Hello
want to build a bell for my electric skateboard to warn or draw attention like a bicycle bell.
Bought a buzzer and ATiny85 to make some noise.
https://www.arduino.cc/en/Tutorial/toneMelody
Have somebody an idea make a "meep meep" like Roadrunner do?
I assume you have a piezo transducer (speaker)? A transducer plays the tone/signal fed-into it. A "buzzer" has built-in electronics to generate it's own sound when you apply power.
I don't know... Have you experimented with just the tone() effect? tone() generates square waves at one frequency, but square waves contain harmonics so it's a little raspy and not a "pure" tone.
The regular Arduino doesn't have a DAC so there's no true-analog output. You might get close to a that kind of sound if you can find the right pitch but I think the problem will be frequency (pitch). Piezo transducers are "tweeters" and they don't do well with low or mid frequencies. As you go-down in frequency it won't be very loud and a high-pitch beep is going to sound like a back-up alarm.
If you just want to experiment with "sounds", [u]Audacity[/u] can generate square waves and you can check-out the sound on your regular computer speakers which have a wider range than a piezo transducer. That's just a quick-and-easy way to figure-out if a square wave is good enough (with better speakers).
You can "fake it" and play voice or music recordings (or a "beep" recording) with [u]TMRpcm[/u], but you'd probably need an amplifier and regular speaker.
BTW - If a square wave works with a piezo or with a speaker & amlifier, you don't need a programmable microcontroller to make a square wave. A [u]beep-beep horn[/u] for a car doesn't have any 'brains" and it may not have any electronics at all, but it needs a pretty-big battery.