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 bos0021 bos0035
BOS0008 Touch Sensor BOS0021 Fan Module BOS0035 Mainboard-3IO
mbt0039 BOS0040
MBT0039 micro:bit BOS0040 micro:bit BOSON Expansion Board

Software Preparation

MakeCode or Mind+

Wiring Diagram

Non-programming Project

Connection 1

Programming Project

Connection 2

Other Preparation Work

micro:bit and the expansion board will be used in programming projects.

Result

Video Demo

Non-programming Programming
Touch fan non-programming Touch fan programming

Additional Information

Program Flowchart:

Flowchart 1

Was this article helpful?

TOP