Hello hugehead,
You could modify macro definition SENS_NUM to support multiple sensor.
/* sensors are numbered 0-7 */
#define SENS_NUM 0
Hello hugehead, You could modify macro definition SENS_NUM to support multiple sensor. /* sensors are numbered 0-7 */ #define SENS_NUM 0
Hello Robin,
I do not understand how i could manage to read out multiple sensors with that method. I can change the sensor, compile, flash and run the code. Then i can change again, compile, flash and run on different BME688.
/* sensors are numbered 0-7 */
#define SENS_NUM 1
/* sensors are numbered 0-7 */
#define SENS_NUM 2
I would like to have a program that iterates over mutiple sensors during runtime. In the X8 Board-Case, I would like to iterate over the 8 sensors and read them one by one during runtime. With this X8 example it is not possible, as it is running only on 1 instance of Bsec2.
I sent you an example i created in arduino, to read 2x BME688 Pi 3g heads with I2C address 0x77 and 0x76. In there, i create 2 instances of Bsec2 and read them in a loop. In the output of that example (i shared in previous message), I can see from "gas resistance" that it is reading 2 different sensors, with unexpected timing. It is like 3 times reading envSensor1 and 3 times reading envSensor2. It should be reading alsways envSensor1, envSensor2, envSensor1, envSensor2. The values should be coming every ~ 3 seconds, what i saw in example with single sensor.
I am getting the warning 100. What is it about? How can i get rid of this warning 100? Do I have to save the current state of the library for each Bsec2 instance? Right now i am using one library for 2 sensors. Is that intended to work properly? Please help me to find a solution for this.
Hi,
I have the exact same problem on the BME888 development kit with the x8 basic example. If you want to have continuous data readouts from 2 sensors, it simply doesn't work. Only one sensor is giving a readout via the callback. The other ones gives back a "100" BSEC status.
It seems to me that trying to read sensor status messes the data readouts via the callback.
Is there any plan to release a basic arduino example on how to read multiple sensors at the specified data rate ?
Best regards
Hello hugehead,
Warning 100 means difference between actual and defined sampling intervals of bsec_sensor_control() greater than allowed.
Please ensure that your system calls bsec_sensor_control() at the time instructed in the previous call, a maximum jitter of 6.25% is allowed.
Hello Robin,
Thank you for the answer. I know already that this error is related to the timing. The timing is handled by the Libraries , i get the timestamp for the next call by "bsec_sensor_control".
As i have multiple instances of BSEC2, I made use of "bsec_set_state" and "bsec_get_state" for each of my BSEC2 instances. Still, I need to call the function "bsec_sensor_control" for each of my instances to get proper timestamp. The library, then, gives the error, because i run the funtion "bsec_sensor_control" too fast to get new timestamp.
My main question stays valid: how can i read out multiple BME688 at the same time. There is no example code for this available. I already create an issue in github repo, with no response. Please, could you get someone from the dev team to find out a solution on this? It seems i am not the only one trying to get this done.