from machine import Pin
import time
b0=Pin(9,Pin.IN)
led1=Pin(6,Pin.OUT)
led2=Pin(7,Pin.OUT)
while True:
if b0.value() == 0:
led1.value(1)
print("Motion detected ")
else:
led1.value(0)
print("Motion not detected ")
if b0.value() == 0:
led2.value(1)
print("Motion detected ")
else:
led2.value(0)
print("Motion not detected ")
time.sleep(1)