# There are two main types of buzzer, an active buzzer and a passive buzzer.
# An active buzzer always plays the same tone.
# A passive buzzer can play a variety of tones.
# It requires a connection to be made and a specific signal to play the chosen to
from machine import Pin, PWM
from utime import sleep
from random import randint
speaker = PWM(Pin(0))#,Pin.OUT))
speaker.duty_u16(1000)
for i in range(100):
speaker.freq(randint(100,10000))
sleep(0.5)