from machine import Pin
import neopixel
import time
np = neopixel.NeoPixel(Pin(5), 5)
azul = (0, 255, 255)
apagado = (0, 0, 0)
#bucle def
def encender(indice): #el nº de led que es
np[indice] = azul
np.write()
time.sleep(2)
def apagar(indice):
np[indice] = apagado
np.write()
time.sleep(2)
#bucle for
for i in range(5):
encender(i)
for b in range(5):
apagar(b)