Bosch Sensortec Community

    cancel
    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

    Christoforos
    Established Member

    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:

    #ifndef PIN_CS
    #define PIN_CS SS
    #endif
     
    /* 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?

    Thanks!

     

    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! 

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist