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