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

First measurement read in sps30_example_usage.c always fails #78

Closed
rwaldura opened this issue Dec 8, 2020 · 1 comment
Closed

First measurement read in sps30_example_usage.c always fails #78

rwaldura opened this issue Dec 8, 2020 · 1 comment

Comments

@rwaldura
Copy link

rwaldura commented Dec 8, 2020

sps30_example_usage.c consistently fails to read the very first measurement, in my experience.

sps30-uart/sps30.h says:

sps30_start_measurement() - start measuring
Once the measurement is started, measurements are retrievable once per second
with sps30_read_measurement.

But sps30_example_usage.c calls sps30_start_measurement() right after sps30_start_measurement() -- the first time, without waiting one second before the call.

I propose moving the sleep call at
https://github.com/Sensirion/embedded-uart-sps/blob/master/sps30-uart/sps30_example_usage.c#L121
to line 95 instead, at the start of the loop.

With this change, all my measurements are consistently successful.

@MBjoern
Copy link

MBjoern commented Mar 29, 2021

Good to know, thank you for your inputs

@MBjoern MBjoern closed this as completed Mar 29, 2021
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

2 participants