Calculate BPM and SpO2, and detect the pulse beat.
More...
#include <pulse_monitor.hpp>
|
| | PulseMonitor (const uint32_t samplingRate=100, const uint32_t sec=5) |
| | Costructor.
|
| |
|
bool | isBeat () const |
| | Detect beat?
|
| |
|
float | bpm () const |
| | Gets the BPM.
|
| |
| float | SpO2 () const |
| | Gets the SpO2.
|
| |
| void | setSamplingRate (const uint32_t samplingRate) |
| | Set the sampling rate.
|
| |
| void | push_back (const float ir) |
| | Push back IR.
|
| |
| void | push_back (const float ir, const float red) |
| | Push back IR and RED.
|
| |
| void | update () |
| | Update status.
|
| |
|
void | clear () |
| | Clear inner data.
|
| |
|
float | latestIR () const |
| | Filterd latest ir value.
|
| |
Calculate BPM and SpO2, and detect the pulse beat.
◆ PulseMonitor()
| m5::heart::PulseMonitor::PulseMonitor |
( |
const uint32_t | samplingRate = 100, |
|
|
const uint32_t | sec = 5 ) |
|
inlineexplicit |
Costructor.
- Parameters
-
| samplingRate | sampling rate |
| sec | Seconds of data to be stored |
◆ push_back() [1/2]
| void m5::heart::PulseMonitor::push_back |
( |
const float | ir | ) |
|
◆ push_back() [2/2]
| void m5::heart::PulseMonitor::push_back |
( |
const float | ir, |
|
|
const float | red ) |
Push back IR and RED.
- Parameters
-
- Note
- Calclate SpO2
◆ setSamplingRate()
| void m5::heart::PulseMonitor::setSamplingRate |
( |
const uint32_t | samplingRate | ) |
|
Set the sampling rate.
- Parameters
-
| samplingRate | sampling rate |
- Note
- clear stored data
◆ SpO2()
| float m5::heart::PulseMonitor::SpO2 |
( |
| ) |
const |
|
inline |
Gets the SpO2.
- Warning
- IR and RED must be pushed back
◆ update()
| void m5::heart::PulseMonitor::update |
( |
| ) |
|
Update status.
- Note
- Calclate BPM