from machine import Pin;

btn = Pin(2, Pin.IN, Pin.PULL_UP);
led = Pin(5, Pin.OUT);

while True:
    buttonStatus = btn.value();
    print(buttonStatus)
    if (buttonStatus == 0):
        led.value(1)