Example Code for micro:bit-Light-controlled

Last revision 2026/01/14

This article provides a step-by-step guide on using micro:bit to control Maqueen Plus V2 with light. It includes hardware and software preparation, a wiring diagram, a program link for MakeCode, and outlines the expected result of the car's movement and light behavior.

Hardware Preparation

  • Maqueen Plus V2
  • micro:bit V1/V2
  • Flashlight

Software Preparation

Wiring Diagram

No additional wiring needed beyond the Quick Start Guide.

Other Preparation Work

  1. Complete the Quick Start Guide steps.
  2. Ensure the Maqueen Plus V2 is powered on.

Sample Code

Program Link: https://makecode.microbit.org/_Wue51de0tKyU

Result

Normally, the car is stopped with RGB lights on. When a flashlight illuminates the micro:bit, the car moves forward, RGB lights turn off, and front lights turn on.

Was this article helpful?

TOP