Methods
(static) getTemperature(moduleIndex) → {Promise.<int>}
- Source:
获取温度值(°C)
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
Returns:
温度值,范围 -20~100°C
- Type
- Promise.<int>
(static) getHumidity(moduleIndex) → {Promise.<int>}
- Source:
获取湿度值(%RH)
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
Returns:
湿度值,范围 0~100%RH
- Type
- Promise.<int>
(static) getLight(moduleIndex) → {Promise.<int>}
- Source:
获取亮度值 亮度值代表相对强度,值越大代表亮度越强
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
Returns:
亮度值,范围 0~100
- Type
- Promise.<int>
(static) getVolume(moduleIndex) → {Promise.<int>}
- Source:
获取声音强度值 声音强度值代表相对强度,值越大代表声音越响
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
Returns:
声音强度值,范围 0~100
- Type
- Promise.<int>
(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 |
(static) regTemperature(moduleIndex)
- Source:
注册模块检测的温度值上传,当模块检测的温度值改变会接收到数据,返回类型为int
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
(static) regHumidity(moduleIndex)
- Source:
注册模块检测的湿度值上传,当模块检测的湿度值改变会接收到数据,返回类型为int
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
(static) regLight(moduleIndex)
- Source:
注册模块检测的亮度值上传,当模块检测的亮度值改变会接收到数据,返回类型为int
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
(static) regVolume(moduleIndex)
- Source:
注册模块检测的声音强度值上传,当模块检测的声音强度值改变会接收到数据,返回类型为int
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
(static) unregTemperature(moduleIndex)
- Source:
注销模块检测的温度值上传
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
(static) unregHumidity(moduleIndex)
- Source:
注销模块检测的湿度值上传
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
(static) unregLight(moduleIndex)
- Source:
注销模块检测的亮度值上传
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |
(static) unregVolume(moduleIndex)
- Source:
注销模块检测的声音强度值上传
Parameters:
Name | Type | Description |
---|---|---|
moduleIndex |
int | 模块序号 |