import machine as Gpio
import utime as TM 

sensor_In = Gpio.pin(14,Gpio,pin.In)

def read_pir sensor():
    sensor_output = sensor_In.value()
    if sensor_output == 1:
        print("PIR sensor detected an object")
    else :
        print("PIR sensor did not detected any object")

    while True:
        read_pir_sensor()
        TM.sleep(4)
        
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT