20
This was a WS2812b led ring that I purchased for low cost. There are 12 LEDs in total on this and once you solder 3 cables to the module you are ready to go
Connect Vcc to MIcro:Bit 3.3 volts, Gnd to Gnd and the In to MIcro:Bit 0,
Open Edublocks and create the following
Here is the python code that is created
[codesyntax lang=”python”]
np = None from microbit import * import neopixel np = neopixel.NeoPixel(pin0,12) while True: for red in range(12): np[red] = (255,0,0) np.show() sleep(500) for green in range(12): np[green] = (0,255,0) np.show() sleep(500) for blue in range(12): np[blue] = (0,0,255) np.show() sleep(500)
[/codesyntax]