protocentral_max86150_ecg_ppg icon indicating copy to clipboard operation
protocentral_max86150_ecg_ppg copied to clipboard

void setup() function doesn't seem to change User settings

Open anuragpareto opened this issue 3 years ago • 0 comments

I have tried changing this line in header:

void setup(byte powerLevel = 0x1F, byte sampleAverage = 4, byte ledMode = 3, int sampleRate = 400, int pulseWidth = 411, int adcRange = 4096);

For different Sampling rate and Averaging But, It always gives 4 samples with same value and same number of data samples in a second.

For instance, it always follows this pattern:

14:14:28.371 -> 201 14:14:28.371 -> 201 14:14:28.371 -> 201 14:14:28.371 -> 201 14:14:28.371 -> 214 14:14:28.411 -> 214 14:14:28.411 -> 214 14:14:28.411 -> 214 14:14:28.411 -> 261 14:14:28.411 -> 261 14:14:28.411 -> 261 14:14:28.411 -> 261 14:14:28.411 -> 286 14:14:28.445 -> 286 14:14:28.445 -> 286 14:14:28.445 -> 286 14:14:28.445 -> 229 14:14:28.445 -> 229 14:14:28.445 -> 229 14:14:28.482 -> 229 14:14:28.482 -> 186 14:14:28.482 -> 186 14:14:28.482 -> 186 14:14:28.482 -> 186 14:14:28.482 -> 210 14:14:28.482 -> 210 14:14:28.482 -> 210 14:14:28.525 -> 210

As you can see, it always repeats 4 values like above 210, 186 etc. Which results in flat lines on graph. Another issue is if I try to change Sampling rate, it still gives same number of data samples. Like from 14:14:28.411 to 14:14:28.482, it gives 22 samples, which makes it 22x10 = 220/Sec approx Even though, I chose 1000 sampling rate.

Is there anything I am missing here?

anuragpareto avatar Jun 28 '21 08:06 anuragpareto