Example Code for micro:bit-Mind+ Rainbow Breathing LED Ring
Last revision 2025/12/09
The article provides a comprehensive guide on creating a rainbow breathing LED ring using micro:bit and Mind+, including hardware and software setup, wiring diagram, and sample code for creating stunning visual effects.
Hardware Preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED Ring- 12 LED beads × 1
Software Preparation
The extension library of the RGB LED command needs to be added before using the RGB LED ring. Open Mind+ platform, click "Extensions" in the bottom right corner, and in the "MCU" menu bar, select "micro:bit", the MCU to be used. Then find "WS2812 RGB LED" in the "Display" menu bar and click it to add the RGB LED extension library, then the display module will appear in the command area.
Wiring Diagram

Other Preparation Work
Open Mind+ platform, click "Extensions" in the bottom right corner, and in the "MCU" menu bar, select "micro:bit", the MCU to be used. Then find "WS2812 RGB LED" in the "Display" menu bar and click it to add the RGB LED extension library, then the display module will appear in the command area.
Sample Code

Result
Employ the RGB LED ring to make a rainbow breathing ring that gradually changes from bright to dark and then from dark to bright.
Was this article helpful?
