Example Code for micro:bit-Line-tracking Car
This article provides a comprehensive guide to building and programming a micro:bit line-tracking car. It includes hardware preparation, software setup using Mind+ and MakeCode, detailed wiring diagrams, and sample code for implementation. Readers will learn how to create a functional line-tracking car by following step-by-step instructions and utilizing the provided resources.
Hardware Preparation
![]() |
![]() |
![]() |
|---|---|---|
| BOS0010 Smart Grayscale Sensor | BOS0024 Servo Controller Module | FIT0528 Micro Metal Gear Motor |
![]() |
![]() |
|
| MBT0039 micro:bit | BOS0040 micro:bit BOSON Expansion Board |
Software Preparation
Mind+ and MakeCode graphical programming.
Wiring Diagram
Connection Diagram:

Result
Video Demo
| Programming |
|---|
![]() |
Additional Information
Program Flowchart:

Was this article helpful?






