Example Code for micro:bit-MindPlus-Control LED with Buttons
This article guides users through controlling an LED using micro:bit and MindPlus software by providing hardware preparation, software installation, a wiring diagram, and sample code for button activation.
Hardware Preparation
- Components: 4 jumper wires, one LED light.
- Pin P0 will be used in the project.
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
Press down button A to turn the LED light on, press button B to turn it off.
Was this article helpful?
