from machine import Pin
from time import sleep
pir=Pin(7,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 for movement")
sleep(1)