Comments (8)
@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.
from bme280.
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.
from bme280.
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.
from bme280.
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?
from bme280.
Yes, it does work for me. I used your BME_280_I2C_Test sketch.
Found BME280 sensor! Success.
Temp: 22.42°C Humidity: 44.26% RH Pressure: 97900.85Pa
Temp: 22.33°C Humidity: 44.31% RH Pressure: 97908.03Pa
Temp: 22.32°C Humidity: 44.28% RH Pressure: 97907.81Pa
Temp: nan°C Humidity: nan% RH Pressure: nanPa
Temp: 23.53°C Humidity: 63.39% RH Pressure: 69626.69Pa
Temp: 24.06°C Humidity: 40.52% RH Pressure: 97906.53Pa
Temp: 24.07°C Humidity: 40.53% RH Pressure: 97906.59Pa
Temp: 24.07°C Humidity: 40.51% RH Pressure: 97906.31Pa
I disconnect the BME from 3.3V (nan values) and reattach it.
from bme280.
@coelner In your output the first read after your disconnect is still way off, especially the pressure. Is this still to be expected?
from bme280.
1)
Could not find BME280 sensor!
Could not find BME280 sensor!
Could not find BME280 sensor!
2)
Found BME280 sensor! Success.
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 26.73°C Humidity: 66.95% RH Pressure: 101237.52Pa
Temp: 26.70°C Humidity: 48.61% RH Pressure: 101237.36Pa
Temp: 26.66°C Humidity: 41.93% RH Pressure: 101237.63Pa
Temp: 26.62°C Humidity: 38.96% RH Pressure: 101237.44Pa
Temp: 26.57°C Humidity: 37.40% RH Pressure: 101237.91Pa
Temp: 26.51°C Humidity: 36.45% RH Pressure: 101237.97Pa
Temp: 26.46°C Humidity: 35.89% RH Pressure: 101237.78Pa
Temp: 26.40°C Humidity: 35.58% RH Pressure: 101237.60Pa
Temp: 26.34°C Humidity: 35.41% RH Pressure: 101237.97Pa
Temp: 26.28°C Humidity: 35.18% RH Pressure: 101238.09Pa
Temp: 25.36°C Humidity: 33.31% RH Pressure: 101231.35Pa
Temp: 25.36°C Humidity: 33.13% RH Pressure: 101231.18Pa
Temp: 25.36°C Humidity: 36.83% RH Pressure: 101231.12Pa
3)
Temp: nan°C Humidity: nan% RH Pressure: nanPa
Temp: nan°C Humidity: nan% RH Pressure: nanPa
Temp: nan°C Humidity: nan% RH Pressure: nanPa
Temp: nan°C Humidity: nan% RH Pressure: nanPa
Temp: nan°C Humidity: nan% RH Pressure: nanPa
4)
Temp: 25.37°C Humidity: 38.29% RH Pressure: 101230.91Pa
Temp: 25.39°C Humidity: 47.79% RH Pressure: 101231.15Pa
Temp: 25.42°C Humidity: 45.15% RH Pressure: 101231.32Pa
Temp: 25.44°C Humidity: 39.14% RH Pressure: 101231.70Pa
Temp: 25.65°C Humidity: 33.12% RH Pressure: 101230.97Pa
5)
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
Temp: 22.18°C Humidity: 68.12% RH Pressure: 73302.31Pa
6)
Temp: 26.85°C Humidity: 47.34% RH Pressure: 101235.56Pa
Temp: 26.85°C Humidity: 48.57% RH Pressure: 101235.53Pa
To sum it up:
- No connection over i2c but power
- Connection over i2c
- No connection over i2c but power
- reattached i2c
- removed GND
- reattached GND
the current i2c example was used
from bme280.
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:
705.31
705.31
705.31
1027.43
1027.43
1027.43
1027.47
1027.47
1027.47
1027.47
1027.50
1027.50
1027.50
1027.46
1027.46
1027.46
1027.50
1027.50
1027.43
1027.43
1027.43
1027.41
1027.41
1027.41
1027.41
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 bme.read()
should trigger one measurement and wait for its completion, right?
from bme280.
Related Issues (20)
- branch softwarewire - third instance problem HOT 1
- Station météo
- Station météo
- Filter is only applied to temperature and pressure HOT 3
- STM32F103C8 - bme.begin (); - program stops HOT 3
- BME280 v3.0 not work with u8g2 and display HX1230_SW_SPI HOT 3
- The question of the wind chill HOT 3
- non void function without return value HOT 1
- Propose License Change to LGPL/MIT HOT 28
- AbsoluteHumidity and HeatIndex environment calculations missing HOT 1
- Implement CI HOT 1
- Change Wire hard code over to passed in wire instance in I2C class
- BME280 no humidity :( HOT 1
- BME680 integration HOT 1
- SPI.h is inculed althought BME280Spi is not in use HOT 1
- non-void-return issue in 3.0.0 HOT 6
- ESP32 boot loop when calling bme.begin() HOT 3
- I2C to USB
- delete
- delete HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bme280.