Hi,
Am trying to implement BSEC on an ESP32 module, using ESP-IDF and the example descriped in BSEC Integration guide BST-BME680-Integration-Guide-AN008-47.pdf
While the example run correctly using Arduino IDE and IAQ value and accuracy showup on log after 300 seconds, with startup values at 25.0
[186120.00] T: 28.51| rH: 45.03| IAQ: 25.00 (0)| Static IAQ: 25.00| CO2e: 0.00| bVOC: 0.00
[660120.00] T: 28.50| rH: 47.44| IAQ: 56.14 (1)| Static IAQ: 38.60| CO2e: 0.00| bVOC: 0.00
the same basic example using ESP_IDF (except the output function and i2c related fonctions) with start at 0.00
and maintain that value after 300 seconds
[3261.72] T:28.46 | rH:46.44 | IAQ:0.00 | IAQ_acc:0 | Static IAQ:0.00 | Raw gas :0.00 | Status : 0
No problem with temperature and humidity though ...
What i noticied is that in file bsec_integration.c is that the code with ESP-IDF seems to ignore
case BSEC_OUTPUT_IAQ
case BSEC_OUTPUT_STATIC_IAQ
those outputs are never triggered
It's not the case when compiling with Arduino, and am using exactly the same .c .h .a files.
Thanks
@mdtunisie wrote:
the same basic example using ESP_IDF (except the output function and i2c related fonctions)
If there is any risk that the I2C related fuctions implemented are not the same, would you be able to confirm with a logic analyzer that I2C traces in both setups look exactly the same?
@mdtunisie wrote:
[3261.72] T:28.46 | rH:46.44 | IAQ:0.00 | IAQ_acc:0 | Static IAQ:0.00 | Raw gas :0.00 | Status : 0
The fact that the Raw gas value shows 0.00 here seems to indicate that this output was either not enabled (typ. via bsec_update_subscription), or that the gas sensor configuration was not correctly set or not successfully applied (typ. via bme680_set_sensor_settings). Please ensure that the arguments passed to these two functions are correct and that the resulting I2C transactions also look as expected.
Based on the output of the two points above, also feel free to share code snippets for review to see if anything outstanding can be found.