Example Code for micro:bit-Let's Go!
Last revision 2026/01/14
This tutorial guides users through setting up and coding a micro:bit paired with Maqueen Lite to play melodies and control motor movements using the MakeCode platform, providing a practical example for STEM education.
Hardware Preparation
- Maqueen Lite x1
- micro:bit V1/V2 x1
- MicroUSB cable x1
Software Preparation
- Programming Platform: makecode
- Libraries: maqueen, neopixel
Wiring Diagram
No additional wiring is required except inserting the micro:bit into Maqueen Lite.
Other Preparation Work
- Load MakeCode Graphical Library for Maqueen as described in the previous example.
Sample Code
Code idea: play a melody for three honks, and then set all the motors to a positive turn.
Code URL: https://makecode.microbit.org/_eKuP0cbo8TaP
Code File: maqueen3.hex
Code Screenshot:

Result
After three honks, the Maqueen will move forward at the speed of 50.
Was this article helpful?
