Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anuragpareto opened this issue Jun 28, 2021 · 0 comments
Open

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

anuragpareto opened this issue Jun 28, 2021 · 0 comments

Comments

@anuragpareto
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant