from machine import Pin
from utime import sleep
import _thread

led_red = Pin(15,Pin.OUT)
led_yellow = Pin(14,Pin.OUT)
led_green = Pin(13,Pin.OUT)
button = Pin(16, Pin.IN , Pin.PULL_UP)
buzzer = Pin(12, Pin.OUT)

global button_status
button_status = 0

def button_thread():
    global button_status
    while True:
        if button.value() ==1:
            button_status = 1
_thread.start_new_thread(button_thread, ())

while True:
    if button_status ==1:
        led_red.value(1)
        for i in range(10):N
            buzzer.value(1)
            sleep(0.5)
            buzzer.value(0)
            sleep(0.5)
    global button_status
    button_status = 0

    led_red.value(1)
    sleep(5)
    led_red.value(0)

    led_yellow.value(1)
    sleep(2)
    led_yellow.value(0)

    led_green.value(1)
    sleep(5)
    led_green.value(0)

    led_yellow.value(1)
    sleep(2)
    led_yellow.value(0)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT
pico:GP0
pico:GP1
pico:GND.1
pico:GP2
pico:GP3
pico:GP4
pico:GP5
pico:GND.2
pico:GP6
pico:GP7
pico:GP8
pico:GP9
pico:GND.3
pico:GP10
pico:GP11
pico:GP12
pico:GP13
pico:GND.4
pico:GP14
pico:GP15
pico:GP16
pico:GP17
pico:GND.5
pico:GP18
pico:GP19
pico:GP20
pico:GP21
pico:GND.6
pico:GP22
pico:RUN
pico:GP26
pico:GP27
pico:GND.7
pico:GP28
pico:ADC_VREF
pico:3V3
pico:3V3_EN
pico:GND.8
pico:VSYS
pico:VBUS
led1:A
led1:C
led2:A
led2:C
led3:A
led3:C
bz1:1
bz1:2
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
r1:1
r1:2
r2:1
r2:2
r3:1
r3:2