import Pin
buzzer=Pin(15,Pin.OUT)
while True:
buzzer.value(1) #the buzzer sounds
time.sleep(2) # wait 2s
buzzer.value(0) #the buzzer stops ringing
time.sleep(2) # wait 2simport Pin
buzzer=Pin(15,Pin.OUT)
while True:
buzzer.value(1) #the buzzer sounds
time.sleep(2) # wait 2s
buzzer.value(0) #the buzzer stops ringing
time.sleep(2) # wait 2s