Example Code for micro:bit-180° Servo Rotation
Last revision 2025/12/31
The article details the process of connecting a 180° servo to a micro:bit and programming it for rotation using MakeCode and Mind+. It includes a wiring diagram and sample code for practical application.
Hardware Preparation
Connect the 180° servo module to pin S1.
Software Preparation
-
MakeCode User Library Link: click here
-
Mind+ Upload Mode User Library Link: click here
-
Mind+ Python Mode User Library Link: click here
Wiring Diagram

Sample Code
| MakeCode Program ScreenshotProgram Link:click here | Mind+ Program Screenshot |
![]() |
![]() |
Result

Was this article helpful?


