pimoroni / bme280-python

Python library for the BME280 temperature, pressure and humidity sensor
https://shop.pimoroni.com/products/bme280-breakout
MIT License
65 stars 25 forks source link

First reading always the same, and always incorrect. #35

Open ecnelson opened 1 month ago

ecnelson commented 1 month ago

First set of readings from BME280 driver are incorrect, and always the same. If you wait a bit they're correct (and they do fluctuate).

pi@crouton:~ $ python3 Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from bme280 import BME280 >>> b = BME280(i2c_addr = 0x77) >>> b.get_pressure(), b.get_pressure(), b.get_pressure(), b.get_pressure() (684.6845353898584, 684.6845353898584, 684.6845353898584, 684.6845353898584) >>># wait awhile... >>> b.get_pressure(), b.get_pressure(), b.get_pressure(), b.get_pressure() (848.8356787747891, 848.8356787747891, 848.8356787747891, 848.8356787747891) >>> b.get_pressure(), b.get_pressure(), b.get_pressure(), b.get_pressure() (848.8544261068524, 848.8544261068524, 848.8544261068524, 848.8544261068524)