#Project objective: To test a passive buzzer to play an alarm sound at one second interval
#
#Hardware and connections used:
# Passive buzzer GND to Rasberry Pi Pico GND
# Passive buzzer + Pin to GPIO Pin 15
#
#Programmer: Adrian Josele G. Quional
#if passive buzzer is used, import the Speaker class from picozero
from picozero import Speaker
#creating a speaker object
speaker = Speaker(15)
#continously beep at 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(1)