from machine import Pin import time pin12=Pin(12, Pin.IN) pin13=Pin(13, Pin.OUT) pin13.value(1) while pin12.value()==1: pass pin13.value(0)