-
Notifications
You must be signed in to change notification settings - Fork 39
adafruit_bme680.py, class Adafruit_BME680, _perform_reading(): infinite loop #66
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
Comments
Can you provide a short, simple, complete example sketch that can be used to demonstrate the issue. |
In principle, the Usage Example in the docs is sufficient to demonstrate the issue, given the presence of the hardware in question. We only sample every 10s for the application here. Perhaps the gist of the issue is that hardware isn't always 100% reliable. Arguably the best place to handle temporarily unresponsive hardware is in its API, rather than handling it downstream where it would necessitate an additional layer of complexity to forcibly terminate hung read operations. |
Is the inclusion of the TCA9548A necessary? Or do you get the same issue even without the TCA being used? |
No and no. There was no issue with the BME680 hardware in either configuration. |
OK, if there's no issue, then not sure what the issue is? Is there any issue when using just a single BME680 (no TCA9548A) and running the example code from this library? |
The issue reported is that |
We have an environmental test setup here with several BME680s attached via a TCA9548A. On rare occasions when attempting to read a BME680, we can see _perform_reading() getting stuck in the loop shown below, which effectively halts the data acquisition. Normally each device takes exactly 8 iterations of this loop to collect a value. If we force the loop to terminate after N=20 iterations, successive device reads are successful.
The code below assumes that it will eventually receive new_data, though it seems this isn't always the case. Perhaps this could be modified to address the assumption, and to handle the case that a no-new-data event occurs on the first device read and the values for temp/rh/press/... will be unset?
The text was updated successfully, but these errors were encountered: