import time from machine import Pin Inverter_Pin = Pin(4, Pin.IN) while True: print(Inverter_Pin.value()) time.sleep(1)