Code Example for micro:bit-Turn on Fan
This article demonstrates how to use a micro:bit and BOSON expansion boards to control a fan, covering hardware setup, wiring, and programming with sample code.
Hardware Preparation
![]() |
![]() |
|---|---|
| BOS0003 Self Locking Switch | BOS0021 Fan module |
![]() |
![]() |
| MBT0039 Micro:bit | BOS0040 Micro:bit BOSON Expansion Board |
Wiring Diagram

Sample Code
Mind+ Sample Program:

Result
Demo Videos:

Additional Information
Flow Chart:

Was this article helpful?




