from machine import Pin,PWM from time import sleep buzzer=PWM(Pin(15)) buzzer.freq(5000) buzzer.duty_u16(1000) sleep(1)