-
Notifications
You must be signed in to change notification settings - Fork 105
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
extend Initialize() #62
Comments
The datasheet is a little ambiguous, but it sounds like we could do a measurement without filtering and this will cause the filter buffer to be initialized with values. Is that your interpretation as well? See the section under Table 6. |
Yes, I see it in the same way. I'm not sure why we get no valid values for the first time. They should be copied directly like it is done for the following measurements. |
Alright, I have added a routine to initialize the filter buffer. Could you pull down the filtering branch and check if it fixes the problem? |
Yes, it does work for me. I used your BME_280_I2C_Test sketch.
I disconnect the BME from 3.3V (nan values) and reattach it. |
@coelner In your output the first read after your disconnect is still way off, especially the pressure. Is this still to be expected? |
To sum it up:
the current i2c example was used |
So in your case at least the first value is off, too. Here are 25 pressure measurements (in hPa) I took right after switching on the sensor:
It puzzles me why there are 3 wrong values and then they start to be plausible. Is it possible that in addition to the first value being wrong, I'm also reading the same value multiple times? I'm in forced mode (default), so each |
@finitespace I think we need a deep dive into the code and fix rare cases. Maybe some things could be fixed by integrate the pending pull requests. |
if we initialize the sensor we must take care of the sensor values. The user should not be bothered with handling the device in the right way, if the user wants a true measurement, they should get it. #59
We need to add at least one measurement (if forced mode is active). But in general we should use the table 6 'filter settings' to force a count of measurements before the user get control.
The text was updated successfully, but these errors were encountered: