BME680 sensor problem solved on this forum, but solution not visible for others?

Hi All,
I am relatively new with the Raspberrypi and new on this forum (as of today). I found the problem below on this forum (Bme 680 python script not working). It looks the same as my problem with the BME680 sensor. It looks like the problem was solved for the OP (Vadi), but the solution is not publicised, at least I can’t see it.
@ sandyjmacdonald Could you help me out here? Can you tell me the solution you gave Vadi, or tell me how I can see the answer Vadi was given? Thank you in advance.

[Vadi]

Mar 2

Hi there,

I am new to the forum and to the raspberry pi stuff and for my first tryout I bought a bme680 sensor.

So far I couldn’t get any readings from it, althoug I used to code from the github side. Now every time I try to run the python 3 code I get an error.

Estimate indoor air quality

Runs the sensor for a burn-in period, then uses a
combination of relative humidity and gas resistance
to estimate indoor air quality as a percentage.

Press Ctrl+C to exit

Traceback (most recent call last):
File “/home/pi/bme680/examples/indoor-air-quality.py”, line 16, in
sensor = bme680.BME680()
File “build/bdist.linux-armv7l/egg/bme680/ init .py”, line 25, in init
self.chip_id = self._get_regs(CHIP_ID_ADDR, 1)
File “build/bdist.linux-armv7l/egg/bme680/ init .py”, line 285, in _get_regs
return self._i2c.read_byte_data(self.i2c_addr, register)
IOError: [Errno 121] Remote I/O error

I am not shure if it is from a wrong ic2 because I didn’t solder the pins like in the description which I thought would only be necessary if I use a second one.

I I try to run the second programm I get this error.

=============== RESTART: /home/pi/bme680/examples/read-all.py ===============

Traceback (most recent call last):
File “/home/pi/bme680/examples/read-all.py”, line 6, in
sensor = bme680.BME680()
File “build/bdist.linux-armv7l/egg/bme680/ init .py”, line 25, in init
self.chip_id = self._get_regs(CHIP_ID_ADDR, 1)
File “build/bdist.linux-armv7l/egg/bme680/ init .py”, line 285, in _get_regs
return self._i2c.read_byte_data(self.i2c_addr, register)
IOError: [Errno 121] Remote I/O error

Thanks for the help in advance.

Try running: sudo i2cdetect -y 1 to see which i2c address your sensor is appearing on- if at all- and post the results. We’ll go from there!

Thanks for your reply.

In the table that is generated afterwards it says 77 at the crossing of line 70 and column 7.

Then you need to change this line in your code:

sensor = bme680.BME680()

to:

sensor = bme680.BME680(0x77)

Awesome!! :) Must have missed that somewhere …

Thank you very much. That was a great help.

Data is coming out :D

Greetings.

Was it our breakout, or another one? I’m wondering why the default i2c address didn’t just work.

No, sorry, it’s a Chinese BME680 clone.

Standard address is 0x76? Why is it that that address doesn’t have to be given in the software?

On an Arduino Uno, I didn’t experience this problem. May be the address is given in the sketch. I have to look that up.

Thanks again.

Cheers

That likely depends on who made said device and who wrote the driver / software. Get both from the same vender an no problems. Mix and match and stuff like this crops in.
Add to that, that a lot of devices don’t have changeable i2c address and its easy to see why the driver / software just looks at or for, the one i2c address. It already knows what it “should” be.
Keep it simple stupid applies to a lot of this. You want it to just work, right out of the box. Otherwise first timers could end up being only timers, if you know what I mean. ;)

^ this :) basically!

There’s no correct address for the hardware- the last bit of the address is determined by connecting a pin (SDO) to either VCC or GND. Different designs may connect this in different ways for myriad reasons- if you had a cuttable trace to select the address, for example, you might connect it to VCC via the trace, if you had a solderable jumper you might pull it up to VCC and connect to GND via the jumper.

The library was written for our board- https://shop.pimoroni.com/products/bme680-breakout

But I don’t care what you’re using- if you’re using out software getting help here then you know we exist ;) Many brands spend a fortune on less!

Know that I’ve found Pimoroni in the past, and a happy customer at that, so we’'ll do business again. You can count on that.
Anyway, thanks again for the help, to @alphanumeric as well . I’m getting wiser by the day :)

1 Like