| ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
|---|
Mario Hub¶
- class MarioHub(name=None, timeout=10000, connect=True)¶
LEGO® Super Mario hub (sets 71360, 71387, 71441 and similar).
Connect a supported hub running Pybricks to a LEGO Mario, Luigi, or Peach figure and reads its color sensor.
- Parameters:
- Raises:
OSError – If the connection attempt fails or times out.
- awaitconnect()¶
Connects to the device. Only needed if you disconnected or initialized with
connect=False.- Raises:
OSError – If the connection attempt fails or times out.
- color() Color¶
Reads the color detected by the color sensor from the latest received notification.
- Returns:
Detected color.
- Raises:
OSError – If the hub is not connected.
- hsv() Color¶
Reads the hue, saturation, and brightness of the color detected by the color sensor from the latest received notification, as a
Colorobject.- Returns:
Measured color.
- Raises:
OSError – If the hub is not connected.