Skip to content
Robot Kit Guide
Illustrated title card for the guide: Maqueen Lite V5 Line Following in MakeCode
setup

Maqueen Lite V5 Line Following in MakeCode

Add the Maqueen extension in MakeCode, transfer a Maqueen Lite V5 line-following program over USB, and calibrate the sensors if they miss the line.

By Robot Kit Guide Editorial · · 3 min read

For Maqueen Lite V5 line following, add the Maqueen extension in MakeCode. DFRobot setup With a line-following program ready, transfer it to the micro:bit over USB and try it on the supplied map. MakeCode USB transfer · DFRobot Quick Start

What you need

Add the Maqueen extension

  1. In MakeCode for micro:bit, select New Project, give the project a name, and select Create. DFRobot setup
  2. In the Toolbox, select Extensions. MakeCode Extensions
  3. Search for dfrobot and select Maqueen. DFRobot setup
  4. Look for Maqueen v5 in the Toolbox after the extension loads. The package is listed as dfrobot/pxt-maqueen. MakeCode Extensions · V5 block definitions · MakeCode package listing

Maqueen V5 blocks for line following

Maqueen v5 blockWhat it does
initialize via I2C until successInitializes the robot over I2C.
Line patrolling set to ONEnables line following.

V5 block definitions

Transfer the program and try the map

  1. Connect the micro:bit to your computer with the USB cable. MakeCode USB transfer
  2. In a browser using the file-download flow, such as Safari or Firefox, select Download to save the .hex file. Micro:bit transfer guide If Download opens WebUSB pairing in Chrome or Edge, use MakeCode’s Save button to get a local copy. Micro:bit transfer guide
  3. Drag the downloaded file onto the MICROBIT drive. The drive disconnects and reconnects as the micro:bit resets. Micro:bit transfer guide
  4. Seat the programmed micro:bit in the Maqueen Lite V5 using the orientation in DFRobot’s diagram. Install the batteries with the positive and negative ends oriented correctly. DFRobot setup and orientation diagram
  5. Move the power switch to ON and check that the power indicator lights up. Set the car on the supplied line-tracing map. DFRobot setup · DFRobot Quick Start

The car should now follow the black line on the map. DFRobot Quick Start

Recalibrate if the sensors miss the black line

The line-tracking sensors are calibrated at the factory. Try recalibrating if they fail to detect the black line. DFRobot calibration guide

  1. Remove the micro:bit mainboard and the ultrasonic sensor. DFRobot calibration guide
  2. Set the robot on the black calibration area with all three probes over black. DFRobot calibration guide
  3. Hold Calc-Key for about two seconds. Release it after the line-tracking indicator flashes twice. DFRobot calibration guide

Move the sensors between white and black and compare the line-tracking indicator with the states below. DFRobot calibration guide

Surface under the sensorsLine-tracking indicator
White backgroundOff
Black backgroundOn

Some printed maps can remain unreadable to the sensors after calibration. DFRobot calibration guide

Evidence and limits

This guide covers the built-in V5 line-following mode and desktop USB transfer. It follows DFRobot’s V5 instructions and Maqueen extension v1.7.17, plus MakeCode and Micro:bit Educational Foundation USB documentation, checked on November 29, 2026. V5 Quick Start · MakeCode package listing · MakeCode USB transfer · Micro:bit transfer guide

No hands-on testing was performed for this guide.

Sources

  1. DFRobot Maqueen Lite V5 micro:bit Robot Kit for STEM
  2. DFRobot Maqueen Lite V5 Getting Started
  3. MakeCode for micro:bit Extensions
  4. MakeCode package maqueen 1.7.17
  5. DFRobot pxt-maqueen block definitions at v1.7.17
  6. DFRobot Maqueen Lite V5 Quick Start for Line Tracing
  7. MakeCode Transferring Programs to Your micro:bit
  8. Micro:bit Educational Foundation Transfer Code to the micro:bit
  9. DFRobot Maqueen Lite V5 Line-Tracking Sensor Calibration

Related