#importando modulos
from machine import Pin
from _thread import start_new_thread
import time
#Creando Objetos
L_rojo = Pin(5, Pin.OUT)
L_azul = Pin(23, Pin.OUT)
#Definiendo las funciones
def loop():
while True:
L_rojo.value(1) #encendiendo led
time.sleep(1) #tiempo de encendido
L_rojo.value(0)
time.sleep(1)
def loop2():
while True:
L_azul.value(1) #encendiendo led
time.sleep(1) #tiempo de encendido
L_azul.value(0)
time.sleep(1)
#inical el loop2 con la funcion de hilo separado
start_new_thread(loop2, ())
#correr el loop como función principal
loop()