import machine as gpio
import utime as TM
import machine import Pin
Sensor_In = gpio.Pin(14, gpio.Pin.IN)
led = Pin
def read_Pir_sensor():
sensor_output = Sensor_In.value()
if sensor_output == 1:
print("PIR sensor detected an object.")
led.value(1)
else:
print("PIR sensor did not detect any object.")
led.value(0)
while True:
read_Pir_sensor()
TM.sleep(4)