flash force Wiki
Interactive browser →
Wiki / LEGO hardware
#device#ble#powered-up#optical#mario

LEGO Mario

Mario, Luigi and Peach are battery-powered interactive figures sold from 2020 on, each with a colour sensor on port 1 and a costume contact on port 2. They speak LWP3 over Bluetooth on the standard hub service, the same link as every Powered Up hub.

Reach

CapabilityStateNote
Connect from any Bluetooth centralworks, untested hereOrdinary LWP3 peripheral on the standard hub service: a phone, a browser or the bridge, nothing reflashed.
Tell the three figures apart before connectingworks, untested hereAdvertising system type 0x43 Mario, 0x44 Luigi, 0x45 Peach. LEGO's published spec lists none of the three; the identifiers came from people taking the figures apart.
Read a printed code shown to itworks, untested hereColour sensor on port 1, five coloured lines per code: the first two are always green then red, a header saying a code is starting, and the other three carry the value. 0x01 to 0xd2, so 210 patterns, 7 by 6 by 5.
Read which costume is fittedworks, untested herePort 2, a 6-bit code 0 to 63 that the figure feels rather than sees. Not an optical channel.
Drive a motor or a lampout of reachThe figure has no outputs at all; the documented ports are inputs.
Use it from Flash Forceout of reachNothing on the figure to drive, and the page has no view for a sensor value.

What it hears

Bluetooth, both ways, on the standard hub service, and the frames are the ordinary ones: LWP (Powered Up BLE) holds them, and the figure answers a central like any other peripheral on that link.

There is a second channel and it is not radio. The sensor reads printed colour codes, one way only, which makes the figure the one LEGO product still in production that you program by showing it a printed code. It is the Code Pilot barcode card twenty-three years later: one read bars of black on white, the other reads lines of colour, and the paper against light comparison is set out in Barcodes (Code Pilot). Costume detection is a third thing again, felt and not seen.

Reaching it today

Connect and listen. Any Bluetooth central reaches it with nothing reflashed, so the least effort is a phone or a browser page; the bridge reaches it too, but it buys nothing here because there is no infrared or lamp in the path.

A session is a read, not a drive: which code was shown, which costume is on, what the sensor sees. Clients that already do it are in the Links below, in Python and in C++.