Variable read times for BME280

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
pmulvey
Posts: 45
Joined: Sun Jul 29, 2018 8:12 am
Location: Athlone, Ireland

Variable read times for BME280

Post by pmulvey » Sun May 12, 2019 1:14 pm

I am using the bme280_float library. The bme280.altitude property sometimes takes different times to complete and it seems random (8 - 80mS). Anyone notice this before?

Code: Select all

while True: 
    a = ticks_ms()
    print ((accelerometer.get_values()['AcX']) / 4096)
    print (ticks_ms() - a)
    print (bme280.altitude)
    print (ticks_ms() - a)
    print ("------------------")
    sleep_ms(20)
Output:

Code: Select all

------------------
1.03906
4
-132.135
80
------------------
1.05933
4
-132.135
9
------------------
1.04175
4
-132.367
80
------------------
1.05347
4
-132.452
58
------------------
Paul Mulvey

Post Reply