from machine import Pin
from time import sleep
ledRojo_pin = 21
ledAmarillo_pin = 22
ledVerde_pin = 23
ledRojo = Pin(ledRojo_pin , Pin.OUT)
ledAmarillo = Pin(ledAmarillo_pin, Pin.OUT)
ledVerde = Pin(ledVerde_pin , Pin.OUT)
while True:
ledRojo.value(1)
ledAmarillo.value(0)
ledVerde.value(0)
sleep(3)
ledRojo.value(1)
ledAmarillo.value(1)
ledVerde.value(0)
sleep(3)
ledRojo.value(0)
ledAmarillo.value(0)
ledVerde.value(1)
sleep(3)
ledRojo.value(0)
ledAmarillo.value(1)
ledVerde.value(0)
sleep(3)