I’ve got the Qwiik kit for Raspberry Pi hooked up on an RPi 3B+ using the included PHat and the sample code. It successfully reads all the sensors and displays the data on the OLED display and uploads to Cayenne.
I understand the issue about the clock stretching. And, I 'M aware of the potential heating effect of the CCS811
There are two issues, both apparently related to the pressure measurement on the BME280.
First issue is that the pressure reading is exactly invariant at 101325.00. It does not change at all and has been this way since the devices were first turned on.
Second is that the altitude calculation, which is presumably derived from the pressure reading is wrong, typically by about 2X… We are near Loveland, CO, so around 5000ft. The altitude, unlike the pressure, DOES vary, and has been as low as - 1000ft and as high as +2500, but it’s never gotten close to 5000ft.
Those readings from the BME280 seem to indicate a larger problem with that sensor. I would suggest you fill out an [RMA request to have your module replaced.](Return Policy - SparkFun Electronics)
At least part of the problem is not with the BME280, but rather with the sample code for the Combo Board. Upon careful inspection of the python code, it’s apparent that in fact the reported pressure is actually a fixed reference value, and, the measured value is not reported at all. I confirmed this by trying the sample python code for only the qwiic BME280, and in that case, there is a live pressure measurement that is in the correct direction. The value of both pressure and temperature are off, but that may be because of the known heating from the CCS811 device.
The altitude calculation still very far off, but there are reports elsewhere that this is a problem with the Sparkfun “library” and that when the Adafruit library is used instead, suitably accurate altitude measurements can be obtained. I’m not sure what the issue is or how to find it, but it would be nice if it could be addressed. I’ve seen other reports in the Sparkfun forum.
Further to this issue, it’s now clear that the algorithm that Sparkfun is using to calculate the pressure has an error. As a result, the altitude calculation is also incorrect. However, the measurements of Temperature and Humidity seem to be OK.
To confirm this, I have modified the sample code for the Combo Board so that both the Sparkfun and Adafruit libraries are available, and then calculated the key parameters with both. While both calculations agree for Temperature and Humidity, the pressure calculated by Sparkfun is about 10% too high (e.g. 938 hPa vs. 850 hPa, verified by the national weather service website for our area. When this incorrect pressure is used to calculate the altitude, the results indicate the altitude calculation is OK.
I have no clue what the issue actually is, but, since the pressure error occurs with all of the sample Python programs that Sparkfun has provided for the BME280, it would seem that this should be corrected.
Here is an example showing the discrepancy in pressure.
Since I can also do a test with the Arduino, I did. The results are consistent with the Adafruit results:
CCS811 data:
CO2 concentration : 735 ppm
TVOC concentration : 51 ppb
BME280 data:
Temperature: 27.52 degrees C
Temperature: 81.54 degrees F
Pressure: 83863.17 Pa
Pressure: 24.76 InHg
Altitude: 1566.98m
Altitude: 5141.00ft
%RH: 27.17 %
Note in particular the correct altitude and Pressure (we are near Denver) (National Weather Service reports a pressure of 83670.1 Pa at the nearest airport.)
Conclusion: The pressure algorithm for the Arduino is apparently correct. The Pressure algorithm for the RPi is not.
I do not have the skill to resolve this. I hope that someone does…