Example Code for micro:bit-Touch-controlled Fan
This article offers a comprehensive guide to creating a touch-controlled fan using micro:bit, including hardware and software setup, wiring diagrams, and example code in both Mind+ and MakeCode, making it accessible for beginners and tech enthusiasts alike.
Hardware Preparation
![]() |
![]() |
![]() |
|---|---|---|
| BOS0008 Touch Sensor | BOS0021 Fan Module | BOS0035 Mainboard-3IO |
![]() |
![]() |
|
| MBT0039 micro:bit | BOS0040 micro:bit BOSON Expansion Board |
Software Preparation
MakeCode or Mind+
Wiring Diagram
Non-programming Project

Programming Project

Other Preparation Work
micro:bit and the expansion board will be used in programming projects.
Result
Video Demo
| Non-programming | Programming |
|---|---|
![]() |
![]() |
Additional Information
Program Flowchart:

Was this article helpful?







