from machine import Pin
from time import sleep

pir=Pin(16,Pin.IN)


while True:
    if pir.value()==1:
        print(f"PIR value: {pir.value()} Status : Motion Detected")
    else:
        print(f"PIR value: {pir.value()} Status : Waiting ")
    sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT