adafruit / Adafruit_CircuitPython_BME680

CircuitPython driver for BME680
MIT License
56 stars 39 forks source link

Slow refresh rate #65

Open joezilla86 opened 1 year ago

joezilla86 commented 1 year ago

Between 3.4.13 and 3.5 release, the rate at which the sensor returns readings has drastically slowed. I can get a new reading every ~0.3 seconds (the sensor can return readings much faster than this, but they only update about every 0.3 seconds). Whereas when I change to 3.5.0 the readings only update about every 4 seconds.

I tried the following minimal code using a QtPY ESP32-S2 and a BME688 and the only thing I'm changing is the version of the BME680 library loaded on the board.

import board
import busio
import time
from adafruit_bme680 import Adafruit_BME680_I2C as BME688

i2c = busio.I2C(board.SCL1, board.SDA1)
sensor = BME688(i2c)

while True:
    print('Temp: {} C \tPres: {} hPa\t{}'.format(sensor.temperature, sensor.pressure, time.monotonic()))
    #time.sleep(.25)
CTho9305 commented 4 months ago

Could you check whether this is fixed in the latest version?