I am trying to connect an lcup heart rate sensor which is an analog device . i am using the SAADC example t interface it to the NRF52 board, but iam not getting the expected values.ow to congigure it for the lcup heart rate sensor
I am trying to connect an lcup heart rate sensor which is an analog device . i am using the SAADC example t interface it to the NRF52 board, but iam not getting the expected values.ow to congigure it for the lcup heart rate sensor
thanks for the answer,,i am getting the values now properly
thanks for the answer,,i am getting the values now properly
So, for the benefit of future readers who may have the same or similar problems, please describe what was wrong, and how you fixed it.
actually i am getting raw values from the sensor,,i mistook it as BPM vaiues,
i have changed the raw values to the BPM.
pass the raw values to this function ,,
it wil give BPM
by using this code
void data_convert(uint16_t a) { double alpha = 0.75; static double oldValue = 0; static double oldChange = 0; int rawValue = a; float voltage = rawValue * (5.0 / 1023.0); double BPM = alpha * oldValue + (1 - alpha) * rawValue; NRF_LOG_INFO("%d\n",BPM); }