adafruit / Adafruit_CircuitPython_BME280

CircuitPython driver for the BME280
MIT License
64 stars 42 forks source link

bme280.sea_level_pressure #14

Closed grok00 closed 6 years ago

grok00 commented 6 years ago

In example "bme280_simpletest.py" I see bme280.sea_level_pressure being set in the example but I don't see it being used. This is an important feature for air pressure and elevation. I can set this variable to any number and it makes no difference in the results.

Frank

caternuson commented 6 years ago

It gets used in the altitude calculation here: https://github.com/adafruit/Adafruit_CircuitPython_BME280/blob/master/adafruit_bme280.py#L184

Can you provide more detail of how you are setting it but not seeing any effect. A code snippet that demonstrates the issue would help.

grok00 commented 6 years ago

Caternuson,

I guess I expected to see a difference in the Pressure results but in fact it makes a big difference in the Altitude setting which actually makes the most sense (my Pressure readings still don't match the local weather service pressure results but I'm not sure how important that is and something I'll look at closer).

My mistake I didn't see Altitude change. I guess I need to look closer at the code to see how the bme280.sea_level_pressure variable is picked up and used.

Part of my learning experience with Circuit Python I guess!

I'm sorry I wasted your time and thank you for such a quick response! Frank

caternuson commented 6 years ago

No problem. Yep, pressure is just current actual pressure at your location. The difference with the weather service reading could be a combination of location and sensor accuracy differences. It shouldn't be huge but it also won't match exactly.

If you find any other oddness, just let us know.