wonder how can i get the same result as that person..
Any new idea not detailed in this forum?
Can anyone tell me how to interpret the numbers so that I can get the heart beat/pulse?I posted the numbers I measured in attachment.
int rawValue = analogRead (sensorPin);
double value = alpha * oldValue + (1 - alpha) * rawValue;
For correct sensor adjustment see my reply #27 and the picture I posted.Your data with many, many 0 measurements show that the LED in your hardware is not correctly adjusted to send its beam to the IR sensor.As far as the code is concerned, you are doing measurement of the raw sensor data in a given moment: Code: [Select] int rawValue = analogRead (sensorPin);And then you are doing a low-pass filtering ("smooting", "averaging") of the values:Code: [Select] double value = alpha * oldValue + (1 - alpha) * rawValue;So "rawValue" is a momentary value measured at a single moment. This number can change very quickly from one measure to the next.And "value" is an filtered average value, created from several measured values.This number can change slowly from one measure to the next, as it is an average created from several measurements.So when printing both you will see this in your data:- sometimes "rawValue" is higher than "value"- sometime "rawValue" is lower than "value"If you'd do that correctly (LED adjustment, low-pass filter value), you could see that the speed of this change will be in the rhythm of the heartbeat.