Hello, I working on a project back in the beginning of 2024 a multiple temperature logger using the bme680 on i2c. I had to put it on hold and forgot all about it. I just went recently went through some of my files and saw it. The problem I'm having back then is the second sensor. I couldn't figure out how to get it running because of the library. I found the adafruit library for the bme680 here https://github.com/adafruit/Adafruit_BME680 It works but I there is no example on how I can display the second sensor. Or how to address it. Then I found out I need to attach the SD0 to ground to get the second address.
Once I did that I used an i2c scanner and saw both sensors. It still brings me back to how to get the second sensor working. I searched online for a long time. I couldn't find an example or figure it out how to get it woeking back than.
I'm here once again asking for help on how I can get it to work. Please help me?
I haven't looked at the library in detail. But, I'd suggest instantiating a second Adafruit_BME680 object and provide it's I2C address in the begin() function. See Adafruit_BME680.h:
@gfvalvo Just a quick update. I wasn't able to get it working I went throught the datasheet and library. I guess My still lack of skills somehow I couldn't figure it out. And searching online leed me to nowhere. However I did manage to find this on github after searching over 200 sites trying to figure this out. A library that has an example with both sensors on it here https://github.com/sparkfun/SparkFun_BME280_Arduino_Library/tree/V_1.2.0 it's an older library. However it does work and I did manage to get both sensors working.
well not at first it was seeing the first one but not the sensor one. And I didn't know why. I looked at all my wiring and it looked good. I looked over the example code and that looked good. I even learned a little from it on how to grab the sensor sensor and how to set it up in the settings which I didn''t know. Now I do know. But I couldn't get it to display a second sensor. Turns out that it was my fault.
I have both sensors set to 0x76 instead of one being 0x76 and second one being 0x77. I put botgh SD0 to ground at the same time. Now I corrected that and I can now see both sensors with no problem.
Thank you @gfvalvo for all the help and information. And also to the community for the great work in here.
If you're interested, you can post your attempt at making it work. Forum members will provide assistance. We can't help you if you don't post the code.
Hello, @gfvalvo I went back to the original cde because I was having problems. I'm trying to change the address for the i2c from 0x77 to 0x76. I added in the setup bme.begin(0x76); in the beginning and in serial monitor says BME680 testCould not find a valid BME680 sensor, check wiring! Not sure why it wouldn't change here. Adding the sktch in here. Not sure what to do to change it to see the other sensor?
@SurferTim Yes I have the SD0 to ground. If I change it in the library it can see the 0x76 but if I add the bme.begin(0x76); in the setup it doesn't see it.
at the moment I'monly using one sensor for testing. I only have one wired up. and put the sd0 to ground. When I finish testing this then I'll wire up a second ine. But for now I can not address this one correctly in setup.
I2C Scanner
Scanning...
I2C device found at address 0x76 !
done
its there and working. again if I change it in the library it works with no ptoblem But if I address it in the setup with bme.begin(0x76); it doesn't see it. It wants to revert back to that 0x77 address.