Raspberry Pi Pico practice problem · Raspberry Pi Pico
A steady tone
MediumBudget $4MicroPython
A passive buzzer is on GP13. It plays the frequency of the square wave you feed it, so make a 2000 Hz tone at half duty (50 %):
pwm = PWM(Pin(13), freq=2000, duty_u16=32768)
Leave it playing.