from machine import Pin, PWM import time _init() SpeakerPin = 15 Speaker = Pin(SpeakerPin, Pin.OUT) Sound = PWM(Speaker) Sound.duty(512) while True: Sound.freq(330) time.sleep(1) Sound.freq(440) time.sleep(1)