from machine import Pin
from utime import sleep
#Semaforo 1
led_rojo, led_amarillo, led_verde = Pin(15, Pin.OUT), Pin(2, Pin.OUT), Pin(4, Pin.OUT)
#Semaforo 2
led2_rojo, led2_amarillo, led2_verde = Pin(5, Pin.OUT), Pin(18, Pin.OUT), Pin(19, Pin.OUT)
while True:
led_rojo.value(1)
led2_verde.value(1)
led_amarillo.value(0)
led2_amarillo.value(0)
print("😁 "*10 , "\n Paso")
sleep(5)
led_amarillo.value(1)
led2_amarillo.value(1)
led_rojo.value(0)
led2_verde.value(0)
print("😡 "*10, "\n Espera")
sleep(2)
led_verde.value(1)
led2_rojo.value(1)
led_amarillo.value(0)
led2_amarillo.value(0)
print("😁 "*10 , "\n Paso")
sleep(5)
led_amarillo.value(1)
led2_amarillo.value(1)
led_verde.value(0)
led2_rojo.value(0)
print("😡 "*10, "\n Espera")
sleep(2)