Breakoutgarden pico w - bme688 configure does not exist

Hi,

I’m trying to configure my bme 688 sensor with pico w but it seems to me the configure method is not included in the supplied library.

from breakout_bme68x import BreakoutBME68X, STATUS_HEATER_STABLE
from pimoroni_i2c import PimoroniI2C



PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
i2c = PimoroniI2C(**PINS_BREAKOUT_GARDEN)


bme = BreakoutBME68X(i2c)
bme.configure(FILTER_COEFF_3, STANDBY_TIME_125_MS, OVERSAMPLING_4X, OVERSAMPLING_8X, OVERSAMPLING_2X)

bme.read()

repsonse:

Traceback (most recent call last):
  File "<stdin>", line 11, in <module>
AttributeError: 'BreakoutBME68X' object has no attribute 'configure'

Hmm, it looks like bme.configure is there in the MicroPython bindings - is the breakout detected/does the code work without that line?

Hi @smdls

I am having a vaguely similar problem trying to configure the BME280:

Instead of

from breakout_bme68x import BreakoutBME68X, STATUS_HEATER_STABLE

You could try

from breakout_bme68x import *

I have the same problem with the bme680 breakout which I try to run with MicroPython on a Pico. I’m affraid your suggestion won’t work properly because according to the bme680 datasheet paragraph 3.2 the oversampling commands apparently must all be given at once in a particular order.
When I import breakout_bme68x and do a dir(breakout_bme68x), configure doesn’t show so I guess it’s not there.

By the way, I’ve tried to find some proper documentation on the breakout_bme68x module in order to see what functionality is available. Can someone enlighten me? Thanks

Hello! Just tried this and the configure method for BME68x was indeed missing a vital line in the MicroPython bindings - try one of these MicroPython builds?

pimoroni-pico-1e1d8bf4f53ada493d42984451d61c59df34ac38-micropython.uf2.zip (421.8 KB)
pimoroni-picow-1e1d8bf4f53ada493d42984451d61c59df34ac38-micropython.uf2.zip (683.1 KB)

@Loek There’s some documentation for this breakout here: pimoroni-pico/micropython/examples/breakout_bme68x at main · pimoroni/pimoroni-pico · GitHub - though you might have to consult the datasheet to find out more about what the configure settings do.

Thank you very much!

Hi,
Just installed pimoroni-picow-1e1d8bf4f53ada493d42984451d61c59df34ac38-micropython.uf2 and tested it following the info at the link above. The configure function still doesn’t work according the instructions because, I guess, configure is in a BreakoutBME68X class(?), but the configuration items are not. When I add "from breakout_bme68x import * ", however, everything seems to work fine.