Hello,
I am trying to get raw data from the BME688 sensor on a Sparkfun board on the Arduino MRK WiFi 1010 board using Arduino IDE 2.0.3 and I2C protocol. I have installed both BME68x and BSEC2 from GitHub. I am not sure if I actually need BSEC2 if I only neet raw data and not iaq.
I can compile and upload the parallel_mode, sequential_mode and forced_mode examples and I get the same error in the Serial monitor:
Sensor error:Communication failure
I guess that the error comes from the code below:
Hi,
I believe you are using Arduino since your boards for Arduino.
If so, you have to download BME68x API and BSEC2 for Arudino in below URL.
https://www.bosch-sensortec.com/software-tools/software/bme688-software/
You should add those 2 zip files in your Arduino library.
Then, open BSEC2 example like basic.ino
\Arduino\libraries\Bosch-BSEC2-Library-master\examples\generic_examples\basic\basic.ino
You shouldn't touch BME68x API part.
The default interface for BSEC2 is i2c, so you can directly use it.
Thank you.
Dear Minhwan,
Thank you for your reply!
Yes, I use Arduino IDE 2.0.3.
I followed the steps you described exactly. When I compile for MKR Wifi 1010 I get the following warning:
"
In file included from /Users/christoforospanteli/Documents/Arduino/libraries/Bosch-BSEC2-Library-master/src/bsec2.cpp:39:0:
/Users/christoforospanteli/Documents/Arduino/libraries/Bosch-BSEC2-Library-master/src/bsec2.h: In member function 'const bsecData Bsec2::getData(bsecSensor)':
/Users/christoforospanteli/Documents/Arduino/libraries/Bosch-BSEC2-Library-master/src/bsec2.h:154:13: warning: missing initializer for member 'bsec_output_t::signal' [-Wmissing-field-initializers]
{ 0 };
^
/Users/christoforospanteli/Documents/Arduino/libraries/Bosch-BSEC2-Library-master/src/bsec2.h:154:13: warning: missing initializer for member 'bsec_output_t::signal_dimensions' [-Wmissing-field-initializers]
/Users/christoforospanteli/Documents/Arduino/libraries/Bosch-BSEC2-Library-master/src/bsec2.h:154:13: warning: missing initializer for member 'bsec_output_t::sensor_id' [-Wmissing-field-initializers]
/Users/christoforospanteli/Documents/Arduino/libraries/Bosch-BSEC2-Library-master/src/bsec2.h:154:13: warning: missing initializer for member 'bsec_output_t::accuracy' [-Wmissing-field-initializers]
"
When I compile for esp32 I get the following error:
"
/Users/christoforospanteli/Documents/Arduino/libraries/Bosch-BSEC2-Library-master/src/bsec2.cpp:138: undefined reference to `bsec_sensor_control'
collect2: error: ld returned 1 exit status
"
This means BSEC2 library works for MKR WiFi 1010 and I do get readings, but not for esp32. The parallel_mode example in the BME68x library compiles and uploads on both boards but I get "
> Sensor error:Communication failure
in the serial monitor. I want to save the raw data on an SD card, so my question is: Do I actually need BSEC or just BME68x library?
Many thanks!
I attach a document showing the circuit I am using.
Did you check that you need pull up resistor for I2C or not?
If you need, please put it.