It appears I have answered my own question.
- I ran the sketch bme680test.ino available at this link:
https://platformio.org/lib/show/1922/Adafruit%20BME680%20Library
This confirmed that all the sensors on BME680 were working correctly.
- I Re-ran mcu_component_test and realized that I only had readouts for temperature, pressure, altitude, and humidty. No reading for VOC.
This led me to dig into the sensebox.ino and make revisions based on the bme680test.ino
- I made the following changes to the sensebox.ino
Find these lines towards end of sketch:
#ifdef BME680_CONNECTED
BME.begin(0x76);
BME.setTemperatureOversampling(BME680_OS_8X);
BME.setHumidityOversampling(BME680_OS_2X);
BME.setPressureOversampling(BME680_OS_4X);
BME.setIIRFilterSize(BME680_FILTER_SIZE_3);
#endif
Add another line to that section to read to read like this:
#ifdef BME680_CONNECTED
BME.begin(0x76);
BME.setTemperatureOversampling(BME680_OS_8X);
BME.setHumidityOversampling(BME680_OS_2X);
BME.setPressureOversampling(BME680_OS_4X);
BME.setIIRFilterSize(BME680_FILTER_SIZE_3);
BME.setGasHeater(320, 150); // 320*C for 150 ms
#endif
Now find these lines at bottom of sketch:
//-----BME680-----//
#ifdef BME680_CONNECTED
BME.setGasHeater(0, 0);
if( BME.performReading()) {
addMeasurement(LUFTTESENSOR_ID, BME.temperature-1);
addMeasurement(LUFTFESENSOR_ID, BME.humidity);
addMeasurement(ATMLUFSENSOR_ID, BME.pressure/100);
}
BME.setGasHeater(320, 150); // 320*C for 150 ms
if( BME.performReading()) {
addMeasurement(VOCSENSOR_ID, BME.gas_resistance / 1000.0);
}
#endif
Revise those lines to the following:
//-----BME680-----//
#ifdef BME680_CONNECTED
if( BME.performReading()) {
addMeasurement(LUFTTESENSOR_ID, BME.temperature-1);
addMeasurement(LUFTFESENSOR_ID, BME.humidity);
addMeasurement(ATMLUFSENSOR_ID, BME.pressure / 100.0);
addMeasurement(VOCSENSOR_ID, BME.gas_resistance / 1000.0);
}
#endif
This worked for me.
There must be a reason for this line of code: BME.setGasHeater(0, 0);
but when I left it in the sketch, the VOC measurement did not appear. If that is a critical component of the code please let me know as I’m open to other suggestions,
Thanks.
aa