灯带模块/LightBelt

Methods

(static) setLedsRgb(moduleIndex, start, end, r, g, b)

Source:
设置一段LED灯颜色(r,g,b 参数都设置为0时,关闭LED)
Parameters:
Name Type Description
moduleIndex int 模块序号
start int 起始位置:1~100
end int 结束位置:1~100
r int 红色:0~255
g int 绿色:0~255
b int 蓝色:0~255

(static) setSingleLedRgb(moduleIndex, num, r, g, b)

Source:
设置单个LED灯颜色(r,g,b 参数都设置为0时,关闭LED)
Parameters:
Name Type Description
moduleIndex int 模块序号
num int 灯的位置:1~100
r int 红色:0~255
g int 绿色:0~255
b int 蓝色:0~255

(static) getFirmwareVersion(moduleIndex) → {Promise.<int>}

Source:
获取当前模块版本号
Parameters:
Name Type Description
moduleIndex int 模块序号
Returns:
Type
Promise.<int>

(static) setOnboardRGB(moduleIndex, rgb)

Source:
设置板载LED的颜色
Parameters:
Name Type Description
moduleIndex int 模块序号
rgb int '红': 1,'绿':2,'蓝':3,'浅蓝':4,'黄':5,'紫':6,'白': 7,'不亮': 8