from machine import Pin,PWM
import time

pin_buzzer = 21
buzzer = PWM(Pin(pin_buzzer))

buzzer.freq(500)
buzzer.duty_u16(45618)
time.sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT