import machine
import utime

button = machine.Pin(16,machine.Pin.IN, machine.Pin.Pull_DOWN)
buzzer = machine.Pin(12,machine.Pin.OUT)
buzzer_on = 0

while True :
    if button.value() == 0 :
        buzzer_on == 0:
        while button.value() == 0:
            buzzer.value(1)
            button.value(1)
            buzzer.value(0)
            utime.sleep(0,2)
        buzzer_on = 1:
    else : buzzer_on = 0
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT