import utime, random
from machine import Pin
button = Pin(16, machine.Pin.IN, machine.Pin.PULL_DOWN)
led = Pin(25, machine.Pin.OUT)
while True:
    print(button.value())
    if button.value()==0:
        led.value(1)
    else:
        led.value(0)
    utime.sleep(0.1)