max30102 - Heart Rate Module(MAX30102)#
Adapted Air780E Air780EP Air780EPS
Note
This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!
max30102.init(i2c_id,int)#
Initialize MAX30102 sensor
Parameters
Incoming Value Type |
Explanation |
---|---|
int |
the id of the i2c bus where the sensor is located. the default value is 0 |
int |
int Pin |
Return Value
return value type |
explanation |
---|---|
bool |
Returns true on success, otherwise it returns nil or false |
Examples
if max30102.init(0,pin.PC05) then
log.info("max30102", "init ok")
else
log.info("max30102", "init fail")
end
max30102.get()#
Obtain heart rate blood oxygen (it takes about 10s to measure)
Parameters
None
Return Value
return value type |
explanation |
---|---|
bool |
Returns true on success, otherwise it returns nil or false |
number |
Heart rate |
number |
blood oxygen |
Examples
None
max30102.shutdown()#
Close max30102
Parameters
None
Return Value
None
Examples
None