from machine import Pin
import utime
Sensor = Pin(3,Pin.IN)
while True:
while Sensor.value() == 0:
print("Objetivo detectado")
utime.sleep(.25)
while Sensor.value() == 1:
print("No hay objetivos")
utime.sleep(.25)