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