Hi. I use Arduino UNO Rev.3 and MySignals HW (eHealth Medical Development Shield for Arduino) to measure heart rate. I have a problem with the sampling rate: I have a sampling frequency of 500 Hz, which means data should come at the rate of 2 milliseconds (ms). But this is not the case I see in csv. file, the difference between one sample to the next upcoming sampling is not always 2 ms and also it keeps changing throughout my log (sometimes the time stamp is identical but nevertheless the voltage changes, sometimes the time value duplicated and triplicated).
time (hh:mm:ss.ffffff), voltage,
float ECG = MySignals.getECG(VOLTAGE);
//Serial.print(“ECG value : “);
// wait for a millisecond
This will cause problems as I will try to have trigger points in data, to measure the time difference between the trigger point and one previous R peak. When there is more than one time stamp, it is not possible to measure.
My question is:
How can I get one sample in every millisecond (1000Hz) ? What I eventually need to see is something like this:
time (hh:mm:ss.ffffff), voltage
Thank you very much in advance!