03-15-2022 03:57 PM - edited 03-15-2022 04:03 PM
Hi all
I bought a BME680 sensor (Watterott Breakout) to measure the indoor air quality and report it to some server using an ESP8266 and the BSEC library via Arduino.
Unfortunately the AIQ accuracy remains 0, even over hours (I let it run for over half a day).
I tried the Arduino Library samples and there around after 5 minutes the accuracy changes to 1. Means the sensor itself works and my code must be wrong.
Now the difference to my code is that the sample just calls 'iaqSensor.run()' in the loop all the time without any delay, and it receives a result every 3 second.
That perfectly matches the sample rate which is set (BSEC_SAMPLE_RATE_LP).
Some experiments have shown that as long as I query iaqSensor.run() more frequently than the sample rate of 3 seconds, the accuracy changes to 1. Means also a delay of 2 seonds is no issue.
But as soon as the delay is higher, e.g. 5 seconds, the accuracy will remain with 0.
I had the understanding that the sample rate just specifies how frequent the sensor can provide updated values. But I would not expect that it does not work properly if these values are not read (I would expect they just get overwritten all the time).
As for my use case, I only need a measurement every 2-3 minutes. So having a delay of 2 minutes is not going to work and it's the reason why my accuracy has remained with 0.
Is that the intention of the library and I need to handle it by myself to call run() constantly in the loop, getting a result only every 3 seconds and use the returned value only every 2 minutes instead of having a delay?
And in case the ESP8266 needs to perform some intermediate activities (e.g. sending/receiving HTTP requests) which takes longer than 3 seconds and hence no run() is called in the meanwhile, it will cause BME680 to loose it's accuracy?
(I know I could move to the ULP rate with an update of 5 minutes, but I prefer 2-3 minutes). BSEC library version 1.4.8.0.
Thanks & Regards
Marcel
Solved! Go to Solution.
03-16-2022 12:33 AM
Hi Manitu,
You should follow our time frame for LP or ULP.
Or, you can't get proper result.
Thank you.
03-17-2022 12:05 AM
Thanks. I had the hope the API works different.