from machine import Pin,PWM
import time
pin=Pin(25, Pin.OUT)
def tone(pin,pitch):
pin.on()
time.sleep_us(pitch)
pin.off()
time.sleep_us(pitch)
while True:
tone(pin,12860)
# pin.on()
# time.sleep_ms(20)
# pin.off()
# time.sleep_ms(20)