脉搏模块/Pulse

Methods

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

Source:
获取脉搏(每分钟脉搏跳动次数) 测量时,从正面(有字的那面)将手指轻轻的贴在绿灯上,等待10秒左右方可测得准确的脉搏值
Parameters:
Name Type Description
moduleIndex int 模块序号
Returns:
脉搏,范围 40~140
Type
Promise.<int>

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

Source:
获取脉搏波形队列中未读内容的个数(最多存储10个未读内容) 返回为0时,说明没有未读取的内容
Parameters:
Name Type Description
moduleIndex int 模块序号
Returns:
未读内容的个数,范围 0~10
Type
Promise.<int>

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

Source:
获取脉搏波形强度值 如果没有未读的数据,则返回上一次的值
Parameters:
Name Type Description
moduleIndex int 模块序号
Returns:
脉搏波形强度,范围 0~255
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) regHeartRate(moduleIndex)

Source:
注册模块检测的脉搏值上传,当模块检测的脉搏改变会接收到数据,返回类型为int
Parameters:
Name Type Description
moduleIndex int 模块序号

(static) regHeartWaveReceived(moduleIndex)

Source:
注册模块脉搏波形值上传,当模块更新脉搏波形值时会接收到数据,返回类型为list
Parameters:
Name Type Description
moduleIndex int 模块序号

(static) unregHeartRate(moduleIndex)

Source:
注销模块检测的脉搏值上传
Parameters:
Name Type Description
moduleIndex int 模块序号

(static) unregHeartWaveReceived(moduleIndex)

Source:
注销模块脉搏波形值上传
Parameters:
Name Type Description
moduleIndex int 模块序号