diff --git a/micropython/examples/breakout_bme68x/bme68x_demo.py b/micropython/examples/breakout_bme68x/bme68x_demo.py index 64f09b08..acae036e 100644 --- a/micropython/examples/breakout_bme68x/bme68x_demo.py +++ b/micropython/examples/breakout_bme68x/bme68x_demo.py @@ -11,12 +11,12 @@ PINS_PICO_EXPLORER = {"sda": 20, "scl": 21} i2c = PimoroniI2C(**PINS_BREAKOUT_GARDEN) -bmp = BreakoutBME68X(i2c) +bme = BreakoutBME68X(i2c) # If this gives an error, try the alternative address -# bmp = BreakoutBME68X(i2c, 0x77) +# bme = BreakoutBME68X(i2c, 0x77) while True: - temperature, pressure, humidity, gas, status, _, _ = bmp.read() + temperature, pressure, humidity, gas, status, _, _ = bme.read() heater = "Stable" if status & STATUS_HEATER_STABLE else "Unstable" print("{:0.2f}c, {:0.2f}Pa, {:0.2f}%, {:0.2f} Ohms, Heater: {}".format( temperature, pressure, humidity, gas, heater)) diff --git a/micropython/modules/breakout_bme68x/breakout_bme68x.c b/micropython/modules/breakout_bme68x/breakout_bme68x.c index a14c73fd..de1d958a 100644 --- a/micropython/modules/breakout_bme68x/breakout_bme68x.c +++ b/micropython/modules/breakout_bme68x/breakout_bme68x.c @@ -11,6 +11,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(BreakoutBME68X_configure_obj, 1, BreakoutBME68X_confi /***** Binding of Methods *****/ STATIC const mp_rom_map_elem_t BreakoutBME68X_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&BreakoutBME68X_read_obj) }, + { MP_ROM_QSTR(MP_QSTR_configure), MP_ROM_PTR(&BreakoutBME68X_configure_obj) }, }; STATIC MP_DEFINE_CONST_DICT(BreakoutBME68X_locals_dict, BreakoutBME68X_locals_dict_table); @@ -95,4 +96,4 @@ MP_REGISTER_MODULE(MP_QSTR_breakout_bme68x, breakout_bme68x_user_cmodule, MODULE MP_REGISTER_MODULE(MP_QSTR_breakout_bme68x, breakout_bme68x_user_cmodule); #endif //////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file +////////////////////////////////////////////////////////////////////////////////////////////////////