pimoroni / bme680-python

Python library for the BME680 gas, temperature, humidity and pressure sensor.
https://shop.pimoroni.com/products/bme680
MIT License
260 stars 93 forks source link

Error in get_sensor_data (after running for some time) #36

Open aubourg opened 3 years ago

aubourg commented 3 years ago

After running ok for some time, I get the following exception

    sensor.get_sensor_data()
  File "build/bdist.linux-armv7l/egg/bme680/__init__.py", line 264, in get_sensor_data
    self.set_power_mode(constants.FORCED_MODE)
  File "build/bdist.linux-armv7l/egg/bme680/__init__.py", line 248, in set_power_mode
    self._set_bits(constants.CONF_T_P_MODE_ADDR, constants.MODE_MSK, constants.MODE_POS, value)
  File "build/bdist.linux-armv7l/egg/bme680/__init__.py", line 307, in _set_bits
    self._set_regs(register, temp)
  File "build/bdist.linux-armv7l/egg/bme680/__init__.py", line 314, in _set_regs
    self._i2c.write_i2c_block_data(self.i2c_addr, register, value)
TypeError: Third argument must be a list of at least one, but not more than 32 integers

and the sensor fails all the time after this.