بِسْمِ ٱللَّٰهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ

Maqueen Lab

Play • Learn • Create
🗂️ Doc Catalog 🧑‍🚀 For kids 🚀 First Day 🤖 Meet Robot 🎒 Kid Journal 🧪 Labs 👨‍🏫 For teachers 🏠 Lab Home 📚 12 Missions 🃏 Cheat Cards ⚡ Quick Games
🤖 Maqueen Lite v4
LINE
DIST — cm
IR
ACC —, —, —
HDG 🧭
BAT 🔋
BLE 0 / 0 · — ms
📡 Connect
Bluetooth connection to your micro:bit
🤖 Maqueen Lab
version 0.1.0
built 2026-04-26
commit main
— (connect to detect)
Name None
📡 BLE stack flow — ms · — / —
🌐 Browser Queue 📡 BLE 🤖 micro:bit ⚙️ Driver 🎯 Output
Activity
📜 Message Log
Raw UART messages
🤖 Maqueen Lite v4
Drive (motors / wheels) Line sensors (P13 / P14) Ultrasonic distance (P1 trig · P2 echo) micro:bit Simple LEDs (P8 / P12) NeoPixels x 4 (P15) Servos S1 / S2 IR remote receiver Piezo buzzer (P0)
🛞 Drive M:L,R
tap or press W A S D · Space = stop
L 0 R 0 I²C 0x10 → motor driver TB6612FNG
drag to drive · release = stop
PERSONALITY
Speed 200
— no recording —
🏁 Dashboard · live cockpit
⚠ COLLISION ⚠ NO LINK N
0 15 30
SPEED · cm/s
0.0
0 50 100
POWER · %
0
N E S W
HEADING · °
0
100+ 30 0
SONAR · cm
ODO 0.00 m
TRIP 0.00 m
PEAK 0.0 cm/s
AVG 0.0 cm/s
00:00
trajet obstacles
🛰️ SLAM the Room cells: 0 area: 0 m² best:
🎯 Drift Champion best:
grid · 25 cm origin HOME N S W E
heading
distance 0.00 m
position 0, 0 cm
speed 0.0 cm/s
⚠ Estimate only — no encoders. Drift grows with battery droop & wheel slip; that's the lesson.
MINI-GAMES
📏 Math the Distance — predict how far the robot will roll best:
🧪 How does this work? (show the physics)
The Maqueen uses differential drive — two wheels, no steering. The robot turns by spinning the two wheels at different speeds.
Both wheels +200 → forward
Both wheels −200 → backward
L−150 / R+150 → spin left
L+150 / R−150 → spin right
Every move you make becomes a tiny text message over Bluetooth:
#42 M:200,200
#42 = sequence number (so we know which reply matches) · M: = "set Motors" · 200,200 = left, right (range −255..+255) · The robot sends back ECHO:42 M:200,200 to confirm it heard you.
🦾 Servos (generic) SRV:i,a
90°
180° SG90 SG90 · top view
mode
controls
S1 90°
90°
180° SG90 SG90 · top view
mode
controls
S2 90°
▶ Sweep speed slow fast 2.0 s/cycle
Sweep range
⚙ fine-tune (180°)
from
to 180°
📟 view PWM signal · 1.50 ms HIGH every 20 ms
📟 PWM signal · pulse width sets the angle 1.50 ms HIGH every 20 ms
3.3 V 0 V 20 ms 40 ms 1.50 ms
0 ms ━ signal · ┄ pulse width · period repeats every 20 ms 60 ms (50 Hz × 3)
🧱 Code that runs on the micro:bit — move slider to send —
maqueen.servoRun(maqueen.Servos.S1, 90)
🧮 PWM Lab — hit the target servo angle best:
target: °
90°
Tip: the closer your guess to the target, the higher your score. Connected? S1 actually moves to your guess.
💡 Simple LEDs LED:i,s
LEFT · OFF
RIGHT · OFF
last sent:
📟 GPIO digital output 3.3 V CMOS
3.3V
0V
L (P8)
R (P12)
💎 NeoPixels × 4 RGB:i,r,g,b
0
1
2
3
🎼 WS2812 bit timing · self-clocked single-wire serial ~800 kHz
5 V 0 V "0" "1" 0.4us 0.8us pixel 0 frame (24-bit GRB):
bit cells G:00 R:00 B:00
⚠️ Standard neopixel conflicts with bluetooth on micro:bit. The pearls above show your intent — actual on-bot lighting requires a BLE-safe NeoPixel fork.
🌈 Simon Says — remember and repeat the color sequence round: best:
🔊 Buzzer BUZZ:f,ms
+ +
+V -V
440 Hz 200 ms
Freq Hz
Dur ms
🎵 Buzz the Tune — tap the keys, robot plays the song
📡 Morse Decoder — listen and type what you hear best:
A=•— · E=• · S=••• · O=——— · T=— · I=•• · N=—• … ( • = short, — = long )
📡 Ultrasonic distance P1·P2 DIST?
< 10 cm · obstacle < 30 cm · close ≥ 30 cm · safe — · no echo
10cm 30cm 1m 2m+ echolocation · HC-SR04 (P1 trig · P2 echo) 🦇 — cm
— cm listening...
d = (— ms × 340 m/s) / 2
📈 LAST 30 PINGS — waiting for first reading —
polling
rate 600 ms
👀 Line sensors P13·P14 LINE?
L:
R:
📈 L/R history ━ L · ━ R
● bright = on black line · ○ dim = on white floor
polling
rate 600 ms
🛣️ Auto mode L:— R:—
tick 200 ms
uses Drive speed slider · steers via these eyes
🏁 Line Follower Race — time the lap on a printed track best:
0.00 s
📺 IR remote NEC IR?
📺 NEC frame · last received 38 kHz carrier
preamble addr ~addr cmd ~cmd
last code received
point a NEC remote at the robot
recent:
🎮 Controls
Send commands to your micro:bit
💬 Show a message
🎨 Draw on LEDs
Click and drag to draw!
Quick shapes
Show icons
🧪 Custom JSON command
Send raw JSON payloads to the micro:bit for advanced experiments.
👀 Sensors
See what your micro:bit senses!
🌡️ Temperature
°C
Is it warm or cold?
💡 Light
Bright or dark?
🔊 Sound
Clap or talk!
📱 Tilt & Shake
Move your micro:bit!
Acceleration X
mg
Acceleration Y
mg
Acceleration Z
mg
🧭 Compass
°
Which way is North?
No chart
Button A
Ready
Press the A button!
Button B
Ready
Press the B button!
Logo Touch
Ready
Touch the logo
⚙️ Calibration
🧭 Compass
Not calibrated
Tilt micro:bit to fill the LED screen
⚖️ Accel Zero
No offset
Place micro:bit flat, then click Set Level
🔊 Sound Baseline
No baseline
Quiet room → click Set Ambient
💡 Light Baseline
No baseline
Normal lighting → click Set Ambient
📈 Live Graph
Plot sensor data and custom values in real time.
0 pts
📖 MakeCode Examples
Send custom data to graph
basic.forever(function () {
    let distance = pins.analogReadPin(AnalogPin.P1)
    serial.writeLine("GRAPH:Distance:" + distance)
    basic.pause(200)
})
Plot multiple values
serial.writeLine("GRAPH:Speed:" + speed)
serial.writeLine("GRAPH:Angle:" + angle)
serial.writeLine("GRAPH:Force:" + force)
Conditional alert
if (input.soundLevel() > 150) {
    serial.writeLine("GRAPH:Loud:1")
} else {
    serial.writeLine("GRAPH:Loud:0")
}
🎲 3D micro:bit
Interactive 3D board — mirrors live sensor data
Accel: – Temp: –
🖱️ Drag to rotate 🔍 Scroll to zoom 📡 Live: LEDs, tilt, buttons, touch
🪑 Bench
Tools and experiments for testing micro:bit features.
🧪 Bench Tools
Try out experimental commands or diagnostics here.
Use this area for experiments and debugging.
📥 Bench Response
Output from the micro:bit will appear here.
More
Extra fun stuff!
🎛️ Fun Controls
🔘Button
Switch
🎚️Slider
50
🔢Keypad
You pressed:
🕹️Joystick
📝Text
Last: (none)
💡 Indicators & Outputs
Visual feedback from the system.
📊Level
30%
📈Live Graph
📊Multi-Graph
🧾Debug Console
📄Data Capture
(No samples yet)
⏱️ Audio, Time & Random
Buzzer, timers and random tests.
⏱️Timer
00:00.0
⏲️Delay Action
ms
🎲Random
Value:
🧠 Advanced Controls & Presets
Modes, ranges, presets and global actions.
📂Mode
🔢Numeric
🏁Range
Min 20
Max 80
🎨Color
#ff0000
💾Presets
🧹Global
🎭Theme
🧪 Simulators & Hardware
LED matrix, sensors, pins, servo, keypad…
📐XY Pad
X: 0.5   Y: 0.5
🔲LED Matrix
🌡️Sensors
Temp 20°C
Light 128
Sound 64
🔌Pins
PWM P0
💡RGB Strip
🔢Keypad
Last key:
📁File I/O
No file loaded
📥Response
Output from micro:bit.
🤖 Maqueen Lab 📖 User Guide 🤖 Meet your robot 📐 Engineer schematic 📌 Pinout reference 📋 Roadmap ⭐ GitHub v0.1.0 · forked from bit-playground
🤖 micro:bit Firmware
version · built
Flash this code to your micro:bit V2 using MakeCode:
  1. Click Copy Code below
  2. Open MakeCode and switch to JavaScript mode
  3. Select all (Ctrl+A) and paste (Ctrl+V)
  4. Click Download and flash to your micro:bit
📦 Extension to install
https://github.com/DFRobot/pxt-maqueen
📡 Bluetooth config — paste into pxt.json if BLE is silent
"bluetooth": {
    "enabled": 1,
    "open": 1,
    "whitelist": 0,
    "security_level": 0,
    "uart": 1,
    "event_service": 1,
    "device_info_service": 1,
    "advertising_interval": 200,
    "advertising_power": 7
}
In MakeCode: ⚙ Project Settings → Edit Settings As text → paste the block above into the existing pxt.json.
Open MakeCode

        
⌨️ Keyboard Shortcuts
Space Connect / Disconnect
18 Switch tabs
P Pause / Resume graph
F Fullscreen graph
K Toggle this help
Esc Close overlays
🤖 Welcome to Maqueen Lab!
1 Power on your Maqueen Lite v4 (micro:bit inside)
2 Click Connect and pair with the micro:bit
3 Explore tabs: Drive, Sensors, Servos, Lights, Buzzer
4 🤖 Tap the robot icon up top to meet your robot's parts