boschsensortec / bosch-bsec2-library Goto Github PK
View Code? Open in Web Editor NEWArduino library to simplify using Bosch Sensortec's BSEC2 library
License: Other
Arduino library to simplify using Bosch Sensortec's BSEC2 library
License: Other
Hello,
when compiling the basic example, i get an error
Documents\Arduino\libraries\Bosch-BSEC2-Library\src/bsec2.h:50:10: fatal error: bme68xLibrary.h: No such file or directory #include "bme68xLibrary.h" ^~~~~~~~~~~~~~~~~ compilation terminated. exit status 1 Error compiling for board Arduino MKRZERO.
I cannot find this file in either the repository nor on my laptop. Have you might not included it in the package?
I am using the BME688 sensor on a microcontroller running Mono framework. I would like to use the BSEC library in my application for gas classification.
Is there a way to integrate the BSEC library on such a platform?
Alternatively, is there a way to disclose the key principals behind the algorithm?
My understanding is that the algorithm is a classification ML model. Is there a way to point to the source of the training data?
Hello, could you please make an example for reading multiple bME688 at a time? I hoped the X8 board would do it, but it does read only 1 sensor after the MUX.
HI,
i include in a VSC Project with Platformio the API BME68x-Library and the BSEC2.
Right now I'm trying with the basic example.
following Error appears by compiling
Linking .pio\build\pico_Core2\firmware.elf
c:/users/XX/.platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/12.3.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lalgobsec: No such file or directory
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\pico_Core2\firmware.elf] Error 1
I try the BSEC Library and it works.
I also try the BSEC and BSEC2 in Arduino IDE and it works too.
i took also the newest BSEC2 Version in lib dictionary. Same Error Message.
Where is the Problem?
platformio.ini
[env:pico_Core2]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
lib_deps =
boschsensortec/BME68x Sensor library@^1.1.40407
boschsensortec/BSEC2 Software Library@^1.3.2200
best regards
Hi, I wonder if it's possible to work with BME680 sensor instead BM688 , Is BSEC2 Library supports BME680 gas sensor ??
Hi, most OS for the Pi 4 now offers 64-bit, and raspberry pi os 64-bit is also out of beta. Would be great if a 64-bit version of the BSEC2 library is offered as well. Thanks!
My Rust toolchain:
aarch64-unknown-linux-gnu
I tried to link the Armv8-a
version of the library but it didn't work.
The latest release changes pressure from Pascal to Hecto Pascal. It is not clear why this was done. This is a breaking change and not even mentioned in the release notes.
Bosch-BSEC2-Library/src/bsec2.cpp
Line 177 in 4a08fd0
When I try to build the demo for ESP8266 the following error pops up.
Not used: C:\Users\<username>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266SdFat from C:\Users\<username>\Documents\Arduino\libraries\Bosch-BSEC2-Library-1.1.2200\examples\bme68x_demo_sample\bme68x_demo_sample.ino:52: label_provider.h:47:10: fatal error: freertos/FreeRTOS.h: No such file or directory 47 | #include <freertos/FreeRTOS.h>
I tried it on several instalations and serveral versions of the Bosch libraries but no succes.
I applied the adjustmenst suggested by huggymann but still no succes does some one get the demo building ?
By calling newDataCallback this way:
Bosch-BSEC2-Library/src/bsec2.cpp
Line 359 in 4a08fd0
I do get copy of Bsec2 Instance. This is problematic when I want to know which instance is calling my handler. I would prefer to get pointer to Bsec2 address as a third argument of newDataCallback
Bosch-BSEC2-Library/src/bsec2.h
Line 71 in 4a08fd0
bsecCallback
could be changed to something like:
typedef void (*bsecCallback)(const bme68xData data, const bsecOutputs outputs, Bsec2 *bsec);
I have very basic knowledge of c++, so I don't know if this approach would be correct. What do you think?
bme68x_demo_sample.ino.elf section .dram0.bss' will not fit in region
dram0_0_seg'
region `dram0_0_seg' overflowed by 9240 bytes
I got this every time I try to compile the standard example for any ESP32 board (ESP32 dev board, Adafruit Feather ESP32, Adafruit Feather ESP32 V2, etc.). Lib version 2.0.6. Arduino IDE 2.0.4, and 1.8.19.
Full output:
Library BSEC2 Software Library has been declared precompiled:
Using precompiled library in /Users/vitaliy/Documents/Arduino/libraries/BSEC2_Software_Library/src/esp32
/Users/vitaliy/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/ch/86_06ypx61vbycfklx8fp11c0000gn/T/arduino/sketches/2BE8CB973B317B4922E9E8C4D806A760/bme68x_demo_sample.ino.elf section .dram0.bss' will not fit in region
dram0_0_seg'
/Users/vitaliy/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/Users/vitaliy/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/Users/vitaliy/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 9240 bytes
collect2: error: ld returned 1 exit status
exit status 1
Compilation error: exit status 1
Hi, I've started working on an indoor air quality monitor and happened to purchase an esp32s2 microcontroller (https://feathers2.io/) rather than the supported original esp32. Unfortunately it appears that the provided ESP32 binary is incompatible with the newer chip—Is there any chance of adding support for the new target?
HI. I've bought a BME688x8 board for Feather and want to create a PoC to distinguish a few smells.
I can use Mac + ESP32 Feather + BME688x8 board to collect data and train models in the AI studio for each particular smell.
AI studio output, in my case, it's a BSEC config file that is clear to me.
But how should I use this BSEC file on ESP32 using Bosh-BSEC2-Library to provide live sensor data and see the results of the AI model work?
Please correct me if I misunderstood the process or was missing something.
I find BME688 and the tech around it very attractive, and such guidance would help me to move forward with testing.
I know it's possible by watching a couple of Youtube videos demonstrating that technology.
Thanks for any support!
I'm in the process of porting my application from BSEC to BSEC2 and noticed that the function setTemperatureOffset
does not work. Doesn't matter if I set an offset of 0, 5 or 50 degrees, the sensor reports the same BSEC_OUTPUT_HEAT_COMPENSATED_TEMPERATURE
.
So I started comparing the relevant part of both libraries:
bsec.h
:
[...]
if (_data.status & BME680_NEW_DATA_MSK)
{
if (bme680Settings.process_data & BSEC_PROCESS_TEMPERATURE)
{
inputs[nInputs].sensor_id = BSEC_INPUT_TEMPERATURE;
#ifdef BME680_FLOAT_POINT_COMPENSATION
inputs[nInputs].signal = _data.temperature;
#else
inputs[nInputs].signal = _data.temperature / 100.0f;
#endif
inputs[nInputs].time_stamp = currTimeNs;
nInputs++;
/* Temperature offset from the real temperature due to external heat sources */
inputs[nInputs].sensor_id = BSEC_INPUT_HEATSOURCE;
inputs[nInputs].signal = _tempOffset;
inputs[nInputs].time_stamp = currTimeNs;
nInputs++;
}
if (bme680Settings.process_data & BSEC_PROCESS_HUMIDITY)
[...]
and bsec2.h
:
[...]
if (BSEC_CHECK_INPUT(bmeConf.process_data, BSEC_INPUT_HEATSOURCE))
{
inputs[nInputs].sensor_id = BSEC_INPUT_HEATSOURCE;
inputs[nInputs].signal = extTempOffset;
inputs[nInputs].time_stamp = currTimeNs;
nInputs++;
}
if (BSEC_CHECK_INPUT(bmeConf.process_data, BSEC_INPUT_TEMPERATURE))
{
#ifdef BME68X_USE_FPU
inputs[nInputs].sensor_id = BSEC_INPUT_TEMPERATURE;
#else
inputs[nInputs].sensor_id = BSEC_INPUT_TEMPERATURE / 100.0f;
#endif
inputs[nInputs].signal = data.temperature;
inputs[nInputs].time_stamp = currTimeNs;
nInputs++;
}
if (BSEC_CHECK_INPUT(bmeConf.process_data, BSEC_INPUT_HUMIDITY))
[...]
If I simply swap out the new if-expression for the old one the offset is applied!
/* Checks all the required sensor inputs, required for the BSEC library for the requested outputs */
// Doesn't work:
// if (BSEC_CHECK_INPUT(bmeConf.process_data, BSEC_INPUT_HEATSOURCE))
// Use old expression instead:
if (bmeConf.process_data & BSEC_PROCESS_TEMPERATURE)
{
Hi, I'm looking to implement BME688 with esp32-c6 module, I see that only esp32-c3 binary is included, is it possible to include ESP32-C6 binary?
Or is there anyway to get it working with the c3 binary by any chance?
Hello!
When using the mobile app, we need to load the .aiconfig and .config files to the SD card, besides, .bmeconfig; this way, the user can choose between testing the algorithm or sampling data.
When "Live test algorithm" is selected, the code (main microcontroller) notifies the app (using BLE) if the gas was detected, according to the model. What variable/function notifies such information, in the bme68x_demo_sample sketch? (BSEC 2 Software library).
We want to find in the code when a specific gas is detected just to send a boolean signal to a digital output, instead of using the mobile app.
Many thanks.
It would be great if you could add binaries for the mentioned platforms.
These were included in version 1.4.8.0_Generic_Release of the old library.
BSEC2.cpp compiles in Arduino but link fails with:
Library Bosch-BSEC2-Library has been declared precompiled:
Using precompiled library in D:\Data\PROJECTS\Sketchbook\libraries\Bosch-BSEC2-Library\src\esp32
libraries\Bosch-BSEC2-Library\bsec2.cpp.o:(.literal._ZN5Bsec218updateSubscriptionEP21bsec_virtual_sensor_thf+0x0): undefined
reference to `bsec_update_subscription_m'
...etc for additional multi calls.
I have reloaded from GIT using a zip file for V1.5.0 and the library.json file shows:
"version": "1.5.2400",
My board is ESP32 Dev
So, is there no multi support for ESP32? I need to instantiate for multiple BME688 devices (up to 4) at multiple I2S addresses on a single I2S hardware connection and on multiple I2S hardware connections.
NOTE: I compiled the bme68x_demo_sample.ino using the Adafruit ESP32 Feather board spec and it also fails.
Hello,
I'm on ubuntu 22.04. I try to use BSEC2 lib on arduino IDE. So I followed the informations in README.md, but I'm stuck at compilation. By default, there are many errors (functions not found) because lib is not found. So I modified platform.txt like said on https://github.com/BoschSensortec/BSEC-Arduino-library#installation-and-getting-started to have
compiler.c.elf.extra_flags=-libalgobsec
but I have this error
/home/nuliel/.arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: cannot find -libalgobsec
collect2: error: ld returned 1 exit status
I can see the lib libalgobsec.a in ~/Arduino/libraries/Bosch-BSEC2-Library-1.7.2502/src/esp32c3 .
What should I do to be able to compile the basic example?
Sincerely,
Nuliel
The official download of BSEC includes several configuration files, e.g. "bme688_sel_33v_300s_4d".
It would be helpful to have all of these included in this repository, to be able reference them directly in open source projects (e.g. ESPHome).
According to documentation the default is based on a 1.8V supply voltage, whereas most community projects probably use 3.3V. Without using a configuration file the heater settings are most likely wrong.
Is there any work, repository or guide of the integration between BSEC2 and ESP-IDF?
Hello,
has anyone gotten this to run on the Teensy 4.1 or Cortex m7 processor?
I am unable to compile onto the teensy 4.1.
Currently, the AI studio allows users to choose from a list of pre-defined duty cycles. The documentation states that:
In a future release we plan to have the possibility of defining individual Duty Cycles.
Please clarify if there is any specific date or roadmap for the release of this feature, as it would be very useful for low-power applications.
Alternatively, is there currently any way to modify the AI studio or configuration files to achieve this outcome? Thanks.
Where can I find the fitting "AI-Studio Mobile" app e.g. shown in https://www.youtube.com/watch?v=Crps14LExmI The last published Android version on the BME688 software page is BME688 Development Kit App 1.1.3 from July 2021, so 1 1/2 year old and seems not to work with the latest BSEC lib, see e.g. https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BME688-connection-to-Android-App/m-p/70727/highlight/true#M13751
There are new devices such as the ESP320C3 that contain a RISC-V core - are there plans to support RISC-V (and the appropriate GCC Risc-V compiler)?
Along similar lines, any support the the Apple Silicon computers?
Susan
When executing the sketch, the module starts the sampling process but the reading process stops even before the FILE_SIZE_LIMIT is reached.
The file opens, executes the reading, and saves the data, cyclically. But there is a moment when the file can not be opened anymore, then the EDK_DATALOGGER_LOG_FILE_ERROR is triggered.
The size of the final file saved into the SD card is not the same with every execution, it is from 60KB up to 193KB (too much smaller than the established limit).
We are using:
We would be grateful to receive your support.
Hello,
I would like to use a BME680 sensor with BSEC2 library in a ESP32-S3 with battery.
Can you provide the constraints on using it together with deepsleep?
BSEC library is quite picky in terms of timings.
How does the BSEC2 behave?
When the basic_config_state.ino sketch (examples/generic_examples/basic_config_state/basic_config_state.ino) is uploaded on a Nicla Sense Me it returns the following error:
BME68X error code : -2
when envSensor.begin(BME68X_I2C_ADDR_LOW, Wire)
is called.
Printing the error string by inspecting bsec.sensor.statusString()
it returns Communication failure
.
Any idea how to fix this?
Hello,
I am running a new BME688 device with an Adafruit ESP32 Feather Board. I have imported all necessary zip files into the Arduino IDE and run the basic.ino file; however, I am experiencing an issue.
My output section ends with this:
I understand this isn't necessarily an error, but I'm first wondering if I can evade this message, and second, curious if it relates to what appears on my serial monitor.
My serial Monitor returns " BME68X error code : -2 " which is a communication failure, according to the Bosch API.
Any help would be appreciated.
Thank you in advance,
Joe
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.