from machine import Pin
import time
pir = Pin(13, Pin.IN)
led= Pin(14, Pin.OUT)
while True:
if pir.value()==1:
print("Movmiento detectado")
led.value(1)
time.sleep(1)
else:
print("Sin detección")
led.value(0)
time.sleep(1)
print("-------------------------")