08-21-2020 08:29 AM
Dear community,
I'm currently setting up a project using the BME680 with BSEC Arduino Library 1.4.7.4. I want to use the ability of sampling the different sensor parts with different rates as given in the ULP_LP_Example. LP sampling rate for T/P/H and ULP sampling rate for IAQ/bVOC/eCO2.
My first question is which bsec_config_iaq file to use? The 3s or the 300s version? In the example I see that the following was done:
#include "bsec_serialized_configurations_iaq.h"
But this can be either one of the eight config files provided, right?
My second question is more of an observation where I can't explain the reason but hope that you can help me out. I set up my two sensor lists as given in the example and provided the respective sampling rates as follows:
//just an excerpt of the full program
bsec_virtual_sensor_t sensorList_LP[3] = {
BSEC_OUTPUT_RAW_PRESSURE,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
};
bsec_virtual_sensor_t sensorList_ULP[5] = {
BSEC_OUTPUT_STABILIZATION_STATUS,
BSEC_OUTPUT_RUN_IN_STATUS,
BSEC_OUTPUT_CO2_EQUIVALENT,
BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
BSEC_OUTPUT_IAQ,
};
iaqSensor.updateSubscription(sensorList_ULP, 5, BSEC_SAMPLE_RATE_ULP);
checkIaqSensorStatus();
iaqSensor.updateSubscription(sensorList_LP, 3, BSEC_SAMPLE_RATE_LP);
checkIaqSensorStatus();
void loop() {
if(iaqSensor.run()){
updateState();
Serial.print(String((uint16_t)(millis()/1000)) + "s");
Serial.print(" BSECstate: " + String(iaqSensor.status));
// Serial.print(" IAQacc: " + String(iaqSensor.iaqAccuracy));
Serial.print(" riStat: " + String(iaqSensor.runInStatus));
Serial.print(" stabStat: " + String(iaqSensor.stabStatus));
Serial.print(" IAQ: " + String(iaqSensor.iaq) + "(" + String(iaqSensor.iaqAccuracy) + ")");
Serial.print(" CO2: " + String(iaqSensor.co2Equivalent) + "(" + String(iaqSensor.co2Accuracy) + ")");
Serial.print(" bVOC: " + String(iaqSensor.breathVocEquivalent) + "(" + String(iaqSensor.breathVocAccuracy) + ")");
Serial.print(" p: " + String(iaqSensor.pressure));
Serial.print(" t: " + String(iaqSensor.temperature));
Serial.println(" h: " + String(iaqSensor.humidity));
}
else {
checkIaqSensorStatus();
}
}
Thanks,
Benedikt
10-24-2021 11:35 AM
Worked for me as well. BSEC v1.4.8.0
Had to comment out also zeroOutputs() in readProcessData to keep gas related values going to zero..
Dissapointed that the examples supplied aren't working. Makes me wunder about the BSEC library.
10-25-2021 06:26 PM
Hello,
I don't think we are using zeroOutputs fuction.
Please download as below url. Currently, we released BSEC 2.
https://www.bosch-sensortec.com/software-tools/software/bsec/
Of course, you might need to comment out or modify some code if your arduino hardware doesn't have EE2ROM part.
Thanks,
01-13-2022 09:56 AM
Just to be clear, you're saying this libary is buggy: https://github.com/BoschSensortec/BSEC-Arduino-library/tree/master/examples
What is this library https://github.com/BoschSensortec/BME680_driver/releases and how to use it?
That's now been updated to this one: https://github.com/BoschSensortec/BME68x-Sensor-API
How do those APIs fit into the picture?
As for the bsec_iot_example, it is, at best, very awkward to use. Who wants all those files in their application? WHy can't you make it a good Arduino style library? At least put your bsec_iot_example into a decent library format and example.ino. And you should put a notice on the arduino library that it's buggy.
01-13-2022 10:41 AM
Could you expand upon the libaries. I downloaded one library though the Arduino library manager. You say it's buggy. ANd that we should copy the iot_example libary to the src, but more information is needed.
The existing ..Arduino\libraries\BSEC_Software_Library\src has directories of various platforms atmega, esp8266 and also of bme680
The BSEC_1.4.8._Generic_Release_Update has a number of things in it. It has a config directory with the files defining the various generic... Does that need to go somewhere?
Then there's the algo directory with a lite_version and normal_version, which I assume are the actual libaries. So do those get copied into the src directory? Inside each of those is a bin and inc folder. And the bin folder has a list of hardware platforms : esp, gcc, MAC, avr etc. Inside of the esp file is esp8266 and four files .
SO exactly how is this suppossed to be done?
01-18-2022 03:39 PM
Hello,
This post was year and half ago. The bug I mentioned was already fixed.
Currently, you can use our bsec and bsec2 both for your platform.
For example, in case of bsec2, you can download the our bsec2 example code as below link
arduino github - https://github.com/BoschSensortec/Bosch-BSEC2-Library
general bsec2 example - https://www.bosch-sensortec.com/software-tools/software/bme688-software/
Then, you need to follow the migration guide step for bsec 2.
Yes, you need to use right algo file for your platform. If your platform is esp8266, please use the algo file in esp8266 folder.
If you are using Arduino platform, you just need to add our librariy into Arduino as guided.
Thanks,