Skip to main content

Maqueta: Neopixel RGB

Vamos a hacer una discoteca !!!

from microbit import *
import neopixel
NEOPIXEL = neopixel.NeoPixel(pin14, 4)
from random import randint

while True:
   for index in range(0, 4):
        NEOPIXEL.clear()
        NEOPIXEL[index] = (randint(10, 255), randint(10, 255), randint(10, 255))
        NEOPIXEL.show()
        sleep(100)

Acuérdate después de flashear hay que resetear la micro:bit. Tienes un botón de reset al lado del conector USB de la microbit