Hi,
Im using a BME688. At first, I was using just BME68X-API, avalible on github, and values of temperature, humidity, pressure and gas resistance were ok.
Then, I wanted to add IAQ and CO2 values, so I added BSEC-2.0.6.1 library. Everything on my code seems to work properly. The functions 'bsec_init()', bsec_update_subscription()', bsec_sensor_control()' and 'bsec_do_steps()' return 0, what supposedly means that everything is working fine.
However, any values are returned from bsec_do_steps(). The temperature, pressure and humidity values are the same from the API, and IAQ and CO2 values are 0.
What could be the problem?
Thanks.
Hi RPN93,
What platform are you running on? And do you run unmodified reference code?
Hi BSTRobin,
Im using my own PCB design with BME688 component. BME688 works with I2C, and Im using 'Contiki' operative system for this. This implementation worked with BME68x-API.
For BSEC, I have followed the official examples on github. In the main() function I've initialice 'bsec_init()' and 'bsec_update_subscription()'. The outputs that I want are this:
requested_virtual_sensors[0].sensor_id = BSEC_OUTPUT_IAQ;
requested_virtual_sensors[0].sample_rate = BSEC_SAMPLE_RATE_HIGH_PERFORMANCE;
requested_virtual_sensors[1].sensor_id = BSEC_OUTPUT_CO2_EQUIVALENT;
requested_virtual_sensors[1].sample_rate = BSEC_SAMPLE_RATE_HIGH_PERFORMANCE;
requested_virtual_sensors[2].sensor_id = BSEC_OUTPUT_RAW_TEMPERATURE;
requested_virtual_sensors[2].sample_rate = BSEC_SAMPLE_RATE_HIGH_PERFORMANCE;
requested_virtual_sensors[3].sensor_id = BSEC_OUTPUT_RAW_PRESSURE;
requested_virtual_sensors[3].sample_rate = BSEC_SAMPLE_RATE_HIGH_PERFORMANCE;
requested_virtual_sensors[4].sensor_id = BSEC_OUTPUT_RAW_HUMIDITY;
requested_virtual_sensors[4].sample_rate = BSEC_SAMPLE_RATE_HIGH_PERFORMANCE;
Then , in the loop, I do next:
For 'bsec_do_steps()' I used the next inputs:
inputs[0].sensor_id = BSEC_INPUT_PRESSURE;
inputs[0].signal = dataBME.pressure;
inputs[0].time_stamp = time_stamp;
inputs[1].sensor_id = BSEC_INPUT_HUMIDITY;
inputs[1].signal = dataBME.humidity;
inputs[1].time_stamp = time_stamp;
inputs[2].sensor_id = BSEC_INPUT_TEMPERATURE;
inputs[2].signal = dataBME.temperature;
inputs[2].time_stamp = time_stamp;
inputs[3].sensor_id = BSEC_INPUT_GASRESISTOR;
inputs[3].signal = dataBME.gas_resistance;
inputs[3].time_stamp = time_stamp;
inputs[4].sensor_id = BSEC_INPUT_HEATSOURCE;
inputs[4].signal = 0.0f;
inputs[4].time_stamp = time_stamp;
So what could be the problem for IAQ=0 AND co2 =0??
Accuracy for all the values return 0.
Thanks.
Hi RPN93,
I'm not sure if you have any problems in manually adding sensor API and BSEC-2.6.0.1. It is recommended that you download package from here and run basic_config_state example directly. BSEC_2.0.6.1_Generic_Release contained sensor API and BSEC-2.6.0.1.
https://www.bosch-sensortec.com/software-tools/software/bme688-software/