from machine import Pin
import time
color = Pin(9, Pin.IN, Pin.PULL_UP)
led1 = Pin(10, Pin.OUT)
led2 = Pin(11, Pin.OUT)
while True:
if color.value() == 0:
print("AMARILLO DETECTADO")
led1.value(1)
led2.value(1)
time.sleep(1)
led1.value(0)
led2.value(0)
time.sleep(1)
else:
print("no detecta amarillo")
led1.off()
led2.off()
time.sleep(0.2)