Example Code for micro:bit-Rotated Circular Light
The 9 RGB LEDs display 9 colors (gradients), and then on the lamp ring the nine RGB LEDs display the 9 colors in a continuous loop just like a waterfall light. Modify the color behind the show color to get other solid color rotation effects.
Hardware Preparation
- micro:bit main board ×1
- ROB0150 24 RGB LEDs Circular Expansion Board ×1
(Purchase Link) - USB cable ×1
Software Preparation
-
Development Tool:
MakeCode
https://makecode.microbit.org -
Add the Neopixel Software Package
Load the neopixel library to control the LED ring.
Other Preparation Work
Add the neopixel software package (loading the lamp ring library) in Makecode; the steps are as follows:

Sample Code
Click and enter the graphic programming: The Graphic Programming of Rotated Circular Light



For solid color rotation effect:
Click and enter the graphic programming:Yellow Rotating Circular Light

Result
- Gradient rotation effect: The 9 RGB LEDs display 9 colors (gradients) in a continuous loop just like a waterfall light.

- Solid color rotation effect: The 9 RGB LEDs display a solid color in a continuous loop.
Additional Information
Modify the color behind the "show color" block to get other solid color rotation effects.
Was this article helpful?
