BME688 no new Data

Hello,

I'm working with a Nucleo-G070RB microcontroller and uses the example code out ouf the library 2.0. I could read the read the ID and the initializaition, configuration and the update of the Subscription works fine. I don't forget the bsec_init.

In the function run(), the function bme68c_get_data is called and only in the first Call I get Data. But this data are absolutly wrong. In each of the next Calls, there is no change. N_filds is 0, so the following loop to proceed the data will not work.

Do you have any idea?

Best reply by BSTRobin

Hello Hello doppio-R,

By default, CO2 and VOC was not in output list for this example.
You could modify the following code to enable CO2 and VOC output.

#define NUM_USED_OUTPUTS 10

static bsec_library_return_t bme680_bsec_update_subscription(float sample_rate)
{
...
requested_virtual_sensors[8].sensor_id = BSEC_OUTPUT_CO2_EQUIVALENT;
requested_virtual_sensors[8].sample_rate = sample_rate;
requested_virtual_sensors[9].sensor_id = BSEC_OUTPUT_BREATH_VOC_EQUIVALENT;
requested_virtual_sensors[9].sample_rate = sample_rate;
...
}

View original
5 replies
Resolved