Example Code for micro:bit-MindPlus-Lighting Console
The article provides a step-by-step guide on using a micro:bit and Mind+ to control LED brightness with a potentiometer, including hardware setup, software installation, and code example.
Hardware Preparation
- Components: 7 jumper wires. 1 LED light, 1 potentiometer.
- Pin: connect the potentiometer to P0, the LED to P1.
Software Preparation
- Mind+: Download and install Mind+ Software; install the driver (Refer to the built-in tutorials in mind+).
Wiring Diagram

Other Preparation Work
- For Mind+: Click "Code" at the top right corner to switch to "code mode"; Drag and combine blocks to code; Connect micro:bit to the computer with USB; Select the related COM port in "Connect Device" Drop-down box; Click "Upload".
Sample Code
- Screenshot of mind+ graphical codes:

Result
Rotate the potentiometer counterclockwise to brighten the LED, clockwise rotation to dim the LED.
Was this article helpful?
