Passive buzzers don’t do anything themselves – the software needs to generate a waveform for any sound it wants to make. This example code uses PWM timings to play different notes – your buzzer should be connected to pin 9. Alternatively, take a look at the tone() function.
Buzzer Demo Code
- Passive demo code please see here: https://github.com/Edragon/Arduino