Hello everyone. I am now using Arduino and Pulse Sensor to measure one's heart rate. But now I do have a problem which makes me crazy.
I make a little change to the Smooth function in the library, which makes my data acceptable better. If I directly read it from the serial, and use Serial.println(average); it looks like a fairly good PPG signal series.
So I just want to store these data into an array, which can be used for later calculation. But the problem occurs. I write x[index] = average; just after the previous println sentence, which can, I assume, can guarantee that the value will be stored as soon as possible. However, when I finish storing the data. I find that what is printed from the x[] array is entirely different from the "acceptable" series I mentioned before.
I am really confused and wonder if anyone may answer me why.
I think it can be seen that there could be something related with period. But I want to make data in x [] as similar with serial data as possible. Can someone give me hints or suggestions?
Thanks a lot.
I am not so sure. But that’s modified from the code in the Arduino library. If I execute Serial. println(average); the result is just like the picture I posted in #1.
Do you have any advice?