corazoncito
Diff: HeartRate.cpp
- Revision:
- 0:18957c930b4c
diff -r 000000000000 -r 18957c930b4c HeartRate.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HeartRate.cpp Sat Dec 03 04:25:24 2016 +0000 @@ -0,0 +1,33 @@ +#include "HeartRate.h" + +HeartRate::HeartRate(PinName adc,PinName LO_PLS, PinName LO_MIN) : + sensorPin(adc), + LO_MIN(LO_MIN), + LO_PLS(LO_PLS) +{ +} + +HeartRate::~HeartRate(){ +} + +unsigned short HeartRate::read(){ + + unsigned short value; + value = sensorPin.read_u16(); + + return(value); + +} + +bool HeartRate::available(){ + if(LO_MIN==true || LO_PLS ==true) { + + return(false); + } + else{ + + return(true); + } +} + +