Rtl8710 and adafruit bme680 i2c hang (arduino IDE)

Hello,

I am seeing i2c hang on BME680 sensor from Adafruit (Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor [STEMMA QT] : ID 3660 : $18.95 : Adafruit Industries, Unique & fun DIY electronics and kits) , I am using relatek rtl8710AF dev board and here is sketch supplied by adafruit library (Please see at the end)

here is output on serial console

Designed specifically to work with the Adafruit BME680 Breakout
----> Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor [STEMMA QT] : ID 3660 : $18.95 : Adafruit Industries, Unique & fun DIY electronics and kits

These sensors use I2C or SPI to communicate, 2 or 4 pins are required
to interface.

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing products
from Adafruit!

Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
***************************************************************************/

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include “Adafruit_BME680.h”

#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10

#define SEALEVELPRESSURE_HPA (1013.25)

Adafruit_BME680 bme; // I2C
//Adafruit_BME680 bme(BME_CS); // hardware SPI
//Adafruit_BME680 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK);

void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println(F(“BME680 test”));

if (!bme.begin()) {
Serial.println(“Could not find a valid BME680 sensor, check wiring!”);
while (1);
}

// Set up oversampling and filter initialization
bme.setTemperatureOversampling(BME680_OS_8X);
bme.setHumidityOversampling(BME680_OS_2X);
bme.setPressureOversampling(BME680_OS_4X);
bme.setIIRFilterSize(BME680_FILTER_SIZE_3);
bme.setGasHeater(320, 150); // 320*C for 150 ms
}

void loop() {
if (! bme.performReading()) {
Serial.println(“Failed to perform reading :(”);
return;
}
Serial.print(“Temperature = “);
Serial.print(bme.temperature);
Serial.println(” *C”);

Serial.print(“Pressure = “);
Serial.print(bme.pressure / 100.0);
Serial.println(” hPa”);

Serial.print(“Humidity = “);
Serial.print(bme.humidity);
Serial.println(” %”);

Serial.print(“Gas = “);
Serial.print(bme.gas_resistance / 1000.0);
Serial.println(” KOhms”);

Serial.print(“Approx. Altitude = “);
Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
Serial.println(” m”);

Serial.println();
delay(2000);
}

Adafruit BME_680 library version 2.0.1 hangs where as version 1.0.5 and version 1.0.7 works fine

Hi @Alok_Kumar_Mishra

Are you ok with “version 1.0.5 and version 1.0.7”?

or there are some particular reasons you must use version 2.0.1 now?

I would prefer latest version (2.0.1 onwards),since 2.0.1 hangs therefore I am using 1.0.7

Hi, @Alok_Kumar_Mishra
The problem is we could not help to verify the issue due to lack of sensor(BME680), and since the sensor only stop working when using the newer lib, it is highly likely it is a software issue caused by the update of the Adafruit library

I suggest that you also post a issue under the adafruit lib github repo, so that those with access to both sensor and dev board can help you look into it