import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
from machine import Pin, PWM
from time import sleep
buzzer = PWM(Pin(15))
buzzer.duty_u16(0)
notes = [(262, 0.8), (330, 0.4), (392, 0.5)]
for frequency, duration in notes:
buzzer.freq(frequency)
buzzer.duty_u16(32768) # about 50% duty
sleep(duration)
buzzer.duty_u16(0)
sleep(0.1)
buzzer.deinit()