I am using BSEC to read and calculate values from the BME680 sensor, but the outputs I get for IAQ, compensated humidity, and other non-raw air/gas quality values are all 0.
I also noticed that in bsec_iot_loop, the sensor_settings.next_call variable is set equal to the time_stamp before bsec_sensor_control is called, which means that the wait interval ends up negative, resulting in a BSEC_W_SC_CALL_TIMING_VIOLATION return code.
What could be going on here?
(I'm using the gcc->Cortex M4 version of the library on a crazyflie drone which has a Cortex M4 microprocessor.)
Solved! Go to Solution.
BSEC v126.96.36.199 downloaded from here: https://www.bosch-sensortec.com/software-tools/software/bsec/
I am using
1. bsec_datatypes.h, bsec_interface.h, and libalgobsec.a in algo/normal_version/bin/gcc/Cortex_M4
Note: The firmware for the drone uses hard floats whereas libalgobsec.a uses soft floats, so I extracted the object files from libalgobsec.a, removed the ABI attributes, and replaced the files; this allowed BSEC to be compatible with the firmware.
2. bme680_defs.h, bme680.h, bme680.c, and bsec_integration.h in examples/bsec_iot_example
3. bsec_iot_example.c in examples (bsec_iot_example.ino adapted to c)
I didn't include the bsec_serialized_configurations_iaq files since they appear to be optional.