Problem integrating a new sensor in existing sketch

Hello,

I have the code that runs fine in bme680.ino, and I am trying to integrate it into WeatherStationBME680.ino to display the BME680 data into a new frame. Unfortunately after upload I see on the console that the BME sensor is not being detected: " Could not find a valid BME680 sensor, check wiring!"

Any idea what am I doing wrong?

Thank you for looking into this!

bme680.ino (4.84 KB)

WeatherStationBME680.ino (15.7 KB)

Just to be sure, did you go back and reload the 'working' sketch?

Yes, the "working" version is reading the values as expected.

Try moving the BME initialization closer to the beginning of setup().

Looks a bit better, but still no readings.

20:07:02.655 -> BME680 test
20:07:02.690 -> 
20:07:02.690 -> BSEC library version 1.4.6.0
20:07:02.690 -> BSEC warning code : 10
20:07:02.690 -> Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], Static IAQ, CO2 equivalent, breath VOC equivalent
20:07:03.240 -> .

Need to find out what that warning is.