Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constants don't match Bosch-version #42

Open
bablokb opened this issue May 14, 2021 · 0 comments
Open

constants don't match Bosch-version #42

bablokb opened this issue May 14, 2021 · 0 comments

Comments

@bablokb
Copy link

bablokb commented May 14, 2021

I forked this repo quite some time ago and started porting it to the BME688. I mainly came up with the same set of changes as you now. But when I started to compare all the constants, I noted a number of differences.

E.g. you have

COEFF_SIZE = 41
COEFF_ADDR1_LEN = 25
COEFF_ADDR2_LEN = 16

# Coefficient's address
COEFF_ADDR1 = 0x89
COEFF_ADDR2 = 0xe1

and Bosch has

#define BME68X_LEN_COEFF1                         UINT8_C(23)
#define BME68X_LEN_COEFF2                         UINT8_C(14)

#define BME68X_REG_COEFF1                         UINT8_C(0x8a)
#define BME68X_REG_COEFF2                         UINT8_C(0xe1)

(Bosch also reads and processes a third set of coefficients).

So this stopped me from going on (there are more differences, e.g. in the array-indices, and it would need way more time to figure out where and how all those constants are used). I also ran a program with the Bosch-Code and with my code (which is almost identical to your code) and the results did not match.

All of this is not really related to the BME688, at least Bosch claims their BME68x code works with both sensors. So I wonder if the python-bme680-package has ever produced correct results or if Bosch is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant