# IMPOTACIÓN DE LIBRERÍAS 
import machine          # Permite controlar pines GPIO de la placa
import time             # Para generar retardos (sleep)
import _thread          # Librería para manejar hilos en MicroPython
# CONFIGURACIPON DE PINES
# LED rápido en GPIO 14 como salida
led_rapido = machine.Pin(14, machine.Pin.OUT)
# LED lento en GPIO 15 como salida
led_lento = machine.Pin(15, machine.Pin.OUT)
# FUNCIÓN PARA PARPADEO RÁPIDO
def parpadeo_rapido():
    while True:  # Bucle infinito
        led_rapido.value(1)   # Encender LED
        time.sleep(0.25)      # Esperar 250 ms
        led_rapido.value(0)   # Apagar LED
        time.sleep(0.25)      # Esperar 250 ms
# FUNCIÓN PARA PARPADEO LENTO
def parpadeo_lento():
    while True:  # Bucle infinito
        led_lento.value(1)    # Encender LED
        time.sleep(1)         # Esperar 1 segundo
        led_lento.value(0)    # Apagar LED
        time.sleep(1)         # Esperar 1 segundo
# INICIO DEL PROGRAMA 
# Crear un hilo para ejecutar el parpadeo lento en paralelo
_thread.start_new_thread(parpadeo_lento, ())
# Ejecutar el parpadeo rápido en el hilo principal
parpadeo_rapido()