Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BME688 - Arduino MKR WiFi 1010 Communication failure I2C

    BME688 - Arduino MKR WiFi 1010 Communication failure I2C

    Established Member


    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:

    #ifndef PIN_CS
    #define PIN_CS SS
    /* initializes the sensor based on SPI library */
    bme.begin(PIN_CS, Wire);
    I modified the line:  " bme.begin(PIN_CS, SPI); " to " bme.begin(PIN_CS, Wire); " such that I2C protocol is used instead of SPI. 
    Any help please?
    Many thanks!
    6 REPLIES 6

    Dear Minhwan,

    Thanks for your reply!

    I did check and there are pull-up resistors on the Sparkfun board. I attach the schematics for easier reference. 

    I can get the MKR Wifi 1010 to read raw data from the sensor using the BSEC2 library for arduino. The problem is with the BME68x library that shows communication error. For all cases I am using the given examples with no midifications. 

    Is it possible the the examples or libraries need any update?



    I found the solution to the problem. 

    The example scripts for BME68x library have default communication protocol SPI whereas the BME688 sensor board has I2C. By changing the code in the examples the sensor can read the raw data. I hope this information helps other people with similar problems. 

    Thank you!