Code Example for micro:bit-Light Intensity Detector
The article provides a detailed guide on setting up a micro:bit light intensity detector using BOSON components, including hardware preparation, software tools like Mind+ and Makecode, wiring diagrams, and sample programs to measure and display light intensity accurately.
Hardware Preparation
![]() |
![]() |
![]() |
|---|---|---|
| BOS0004 Light Sensor | MBT0039 Micro:bit | BOS0040 Micro:bit BOSON Expansion Board |
Software Preparation
Mind+ and makecode graphical programming tools.
Wiring Diagram

Sample Code
Mind+ Sample Program:

Result
Detect light intensity with this light sensor, and display the test result.

Additional Information
Flow Chart:

Was this article helpful?



