sparkfun / Qwiic_BME280_Py

Python module for the qwiic bme280 sensor
MIT License
11 stars 3 forks source link

Fixes incorrect calibration readings #3

Closed georgePadolsey closed 10 months ago

georgePadolsey commented 2 years ago

Fixes incorrect calibration readings which causes the pressure readings to be inaccurate (Fixes #1). The cause was the calibration values not properly being read as signed/unsigned as required [^1].

Tested on my component and results with this PR match results from the Arduino library. (Tested on RPi, compared to RedBoard Arduino)

Hope this helps :)

[^1]: BME280 datasheet p. 24 for reference of the data types of each of the calibration values.

sfe-SparkFro commented 10 months ago

Looks great, thank you for your contribution!