from machine import Pin led = Pin(21, Pin.OUT) pul = Pin(19, Pin.IN) while True: led.value(pul.value())