Hi, I am new in GitHub. 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). E.g. time (hh:mm:ss.ffffff), voltage, 13:14:16.341084;1.92; 13:14:16.341585;1.94; 13:14:16.341585;1.86; 13:14:16.341585;1.76; 13:14:16.342087;1.72; 13:14:16.342087;1.77; 13:14:16.342588;1.87; 13:14:16.342588;1.94; 13:14:16.343090;1.92; 13:14:16.343090;1.82; 13:14:16.343591;1.74; 13:14:16.343591;1.74; 13:14:16.343591;1.73;
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 13:14:16.341585; 1.94; 13:14:16.342087; 1.72; 13:14:16.343090; 1.92;