Code Example for micro:bit-Adjustable Speed Whisk

Make a whisk with the whisk head fixed on the motor's shaft, and use the rotation sensor to control the motor's speed.

Hardware Preparation

BOS0001 Rotation Sensor BOS0024 Motor Controller Module FIT0528 N20 Speed Reducing Motor Module
MBT0039 Micro:bit BOS0040 Micro:bit BOSON Expansion Board

Tips: micro:bit and Micro:bit BOSON expansion boards are used in the programming example.

Software Preparation

Development tools: Mind+, Makecode.

Wiring Diagram

Tips: Switch the motor controller to B.

Sample Code

Mind+ Sample Program:

Result

Demo Videos:

Programming

Additional Information

Flow Chart:

Was this article helpful?

TOP