✅ ✅ ✅ ✅ ✅ ✅ ❌

Color Light Matrix(彩色灯矩阵)

../_images/sensor_colorlightmatrix.png
Amatrixon
class ColorLightMatrix(port)

LEGO® SPIKE 3x3 彩色灯光矩阵。

参数:

port (Port) – 设备所连接的端口。

redmatrixlighton
matrix3redwhitebluelist with×lighton
await on(colors)

打开灯光。

参数:

colors(Color 或 list)– 如果给出单个 Color,则所有 9 个灯都设置为该颜色。如果给出颜色列表,则每个灯都设置为相应的颜色。

matrixlightoff
await off()

关闭所有灯光。