from machine import Pin
import time
button= Pin(16, Pin.IN, Pin.PULL_DOWN)
led1= Pin(15, Pin.OUT)
while True:
if button.value() == 0:
led1.value(1)
print ("button with lihgt")
else:
led1.value(0)
print ("button without lihgt")
time.sleep(1)