Mod Lab · Maqueen Lab

Wire up hardware add-ons. Browse the four mods, follow the schematic, copy MakeCode, then hit Test it to fire a quick BLE check.

Disconnected
Labs Robot App
SIG → P15 VCC → 3V3 GND → GND stub

2nd Servo · arm or sweep extension

A second hobby servo on free pin P15 (use P16 if P15 is already taken). Lets you drive a gripper, lift arm, or pan turret alongside the built-in head servo.

Schematic

MAQUEEN LITE v4 micro:bit edge connector P0 P1 P2 P15 P16 3V3 GND SG90 SERVO 3 wires VCC GND SIG · P15

How to wire

  1. Power off the robot. Plug servo red → 3V3, brown/black → GND.
  2. Plug the servo signal (orange/yellow) into the P15 Gravity port (yellow row).
  3. Switch the robot back on. Use servo write pin P15 to angle in MakeCode.

MakeCode (TypeScript)

// Sweep a 2nd servo connected to P15 (0° → 180° → 0°)
input.onButtonPressed(Button.A, function () {
    for (let a = 0; a <= 180; a += 10) {
        pins.servoWritePin(AnalogPin.P15, a)
        basic.pause(40)
    }
    for (let a = 180; a >= 0; a -= 10) {
        pins.servoWritePin(AnalogPin.P15, a)
        basic.pause(40)
    }
})

// Centre on start
pins.servoWritePin(AnalogPin.P15, 90)

Test it · Status

I²C 0x3C SDA → P20 SCL → P19 stub

OLED Display · 0.96" SSD1306

Tiny 128×64 white-on-black screen on the I²C bus (default address 0x3C). Great for showing distance, speed, scores or robot dialogue.

Schematic

MAQUEEN LITE v4 I²C bus (Gravity port) SDA P20 SCL P19 3V3 GND Hello, Maqueen! SSD1306 0.96" addr 0x3C SDA / SCL

How to wire

  1. Plug a 4-pin Gravity I²C cable into the Maqueen's I²C port (matches SDA/SCL/3V3/GND).
  2. Plug the other end into the SSD1306 OLED — colour pairs match.
  3. Add the OLED-SSD1306 extension in MakeCode and call OLED.init(128, 64) before drawing.

MakeCode (TypeScript)

// Requires extension: OLED-SSD1306 (search this name in MakeCode)
OLED.init(128, 64)
OLED.clear()
OLED.writeStringNewLine("Hello,")
OLED.writeStringNewLine("Maqueen!")

input.onButtonPressed(Button.A, function () {
    OLED.clear()
    OLED.writeStringNewLine("A pressed")
    OLED.writeNumNewLine(input.runningTime())
})

Test it · Status

SIG → P1 (analog) VCC → 3V3 GND → GND stub

Gas Sensor · DFRobot SEN0465 / MQ-2

Analogue gas sensor for smoke / LPG / CO style detection. Reads on P1 as a 0–1023 value. Higher = more gas. (The SEN0465 also offers an I²C variant — same plug into the I²C port.)

Schematic

MAQUEEN LITE v4 analog input row P0 P1 P2 3V3 GND GAS SENSOR SEN0465 / MQ-2 analog · P1

How to wire

  1. Plug a Gravity 3-pin cable: red → 3V3, black → GND, blue/yellow → P1.
  2. Pre-heat the sensor for ~30 s on first power-up — readings drift until the heater stabilises.
  3. Use pins.analogReadPin(AnalogPin.P1) and pick a threshold (try 400–600) to fire your alarm.

MakeCode (TypeScript)

// Read gas sensor on P1, alarm when value > 500
let threshold = 500
basic.forever(function () {
    let g = pins.analogReadPin(AnalogPin.P1)
    serial.writeLine("GAS:" + g)
    if (g > threshold) {
        basic.showIcon(IconNames.Skull)
        music.playTone(Note.C5, 150)
    } else {
        basic.showIcon(IconNames.Yes)
    }
    basic.pause(200)
})

Test it · Status

I²C 0x29 SDA → P20 SCL → P19 stub

Color Sensor · TCS34725 RGB + Clear

Senses RGB + clear-channel light over I²C (address 0x29). Has an on-board white LED for consistent illumination. Use it for sorting, line colour ID or "what colour is this?" games.

Schematic

MAQUEEN LITE v4 I²C bus (Gravity port) SDA P20 SCL P19 3V3 GND TCS34725 R G B C LED addr 0x29 SDA / SCL

How to wire

  1. Plug a Gravity 4-pin I²C cable from the Maqueen's I²C port to the TCS34725 breakout.
  2. Make sure the breakout's white LED faces the surface you're scanning, ~10–20 mm above it.
  3. Add the TCS34725 extension in MakeCode and call tcs34725.start() once at boot.

MakeCode (TypeScript)

// Requires extension: TCS34725 (search "TCS34725" in MakeCode)
tcs34725.start()

basic.forever(function () {
    let r = tcs34725.getRed()
    let g = tcs34725.getGreen()
    let b = tcs34725.getBlue()
    serial.writeLine("RGB:" + r + "," + g + "," + b)
    // Show the dominant channel as an icon
    if (r > g && r > b) basic.showString("R")
    else if (g > r && g > b) basic.showString("G")
    else basic.showString("B")
    basic.pause(400)
})

Test it · Status

Press Esc to clear the active status panel. All four mods are stub — commands log only until the firmware support lands.