# project objective: to test a passive buzzer to play an alarm at one second interval
# Hardware and Connections used:
# Passive buzzer gnd to raspberry pi Pico GND
# Passive buzzer + pin to GPIO Pin 15
# Programmer : Pavan Kumar Pari
# if paasive buzzer is used, import the speaker class from picozero
from picozero import Speaker
from time import sleep
# creating a Speaker object
speaker = Speaker(15)
# continuously beep 1 sec interval while the board has power
#note: a passive buzzer can also be used to play different tones
while True:
speaker.on()
sleep(1)
speaker.off
sleep()