Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Possible bug in BME680 Python module?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Possible bug in BME680 Python module?

by kampi on Sat May 23, 2020 10:34 am

I checked out the Adafruit Circuit Python Module for the BME680 sensor from https://pypi.org/project/adafruit-circuitpython-bme680/#files to compare the results with my C driver for the BME680.
I add some code to the Adafruit library to print the calibration value for the range switching error in the Adafruit library and I got the result 15.0

Code: Select all | TOGGLE FULL SIZE
       
self._sw_err = (self._read_byte(0x04) & 0xF0) / 16
print(self._sw_err)


When I read the whole register at address 0x04, I got the result 243 which is ‭1111 0011‬. Bosch writes the following in the device datasheet (Page 22):

2. Read range switching error from register address 0x04<7:4>(signed 4 bit)


So I take the upper nibble of the byte 243, which is 1111, and handle this as a signed 4-bit value which should be -1 and not 15. Is this right or may I´m wrong with this?

Thanks & Greetings
Daniel

kampi
 
Posts: 4
Joined: Sat Apr 20, 2013 4:55 pm

Re: Possible bug in BME680 Python module?

by siddacious on Mon May 25, 2020 8:12 pm

I think you're right! Thanks for mentioning this. Can would you please report your findings here?
https://github.com/adafruit/Adafruit_Ci ... 680/issues

Thanks

siddacious
 
Posts: 271
Joined: Fri Apr 21, 2017 3:09 pm

Re: Possible bug in BME680 Python module?

by kampi on Wed May 27, 2020 2:42 pm

Thank you for your answer.
I will open an issue.

kampi
 
Posts: 4
Joined: Sat Apr 20, 2013 4:55 pm

Please be positive and constructive with your questions and comments.