upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
API for the Ear-clip Heart Rate Sensor. More...
UPM module for the ear-clip heart rate sensor. It is used to measure your heart rate.
Public Member Functions | |
EHR (int pin) | |
~EHR () | |
uint32_t | getMillis () |
void | initClock () |
void | clearBeatCounter () |
void | startBeatCounter () |
void | stopBeatCounter () |
uint32_t | beatCounter () |
int | heartRate () |
uint32_t getMillis | ( | ) |
Returns the time of milliseconds elapsed since initClock() was last called.
void initClock | ( | ) |
Resets the clock
void clearBeatCounter | ( | ) |
Resets the beat counter to 0. The beat counter should be stopped via stopBeatCounter() prior to calling this function.
void startBeatCounter | ( | ) |
Starts the beat counter
void stopBeatCounter | ( | ) |
Stops the beat counter
uint32_t beatCounter | ( | ) |
Gets the beat Counter
int heartRate | ( | ) |
Computes the heart rate