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