import time
import random
from machine import Pin, PWM
time.sleep(0.1) 

#Difference between duty and freq?

buzzer=PWM(Pin(0))
buzzer.duty_u16(65535)
buzzer.freq(1000)


while True:
    r = random.randint(4000, 6000)
    buzzer.freq(r)                       
                    




BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT