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)