When I try to run the read-all.py in the examples folder for the BME680 I get “OSError [Errno 121] Remote I/O error” with some traceback stuff.
Any idea why?
I’m using the Adafruit BME680 if that matters
When I try to run the read-all.py in the examples folder for the BME680 I get “OSError [Errno 121] Remote I/O error” with some traceback stuff.
Any idea why?
I’m using the Adafruit BME680 if that matters
How’s it wired to your Pi, and what do you see if you run: sudo i2cdetect -y 1
This is my first effort with I2C, so forgive me if a simple “77” would have done. I get
Blockquote 0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – 77
Our board uses the i2c addres 0x76
and Adafruit’s uses 0x77
.
You need to change: sensor = bme680.BME680()
To: sensor = bme680.BME680(i2c_addr=0x77)
Thank you, that worked like a charm!
Where does the data log to? I ran read-all.py and I let it punch out values for about 8 hours while I was busy with other things. Where are all of those values at now, or does it log at all?
Edit: Now that I’m reading through the Getting Started With the BME680 guide more closely, I see that I can redirect the output to a .csv by using
python read-all.py > bme680-data.txt
Does that mean that all of those values that I collected for 8 hours are lost?
Yes, those values are lost unfortunately.
The python read-all.py > bme680-data.txt
is not a very robust way of logging, since the read-all.py
script will be buffering internally you’ll log any errors generated by the Python script, and the script will not be recovered if it does fail somehow.
Ideally Python should create and handle its own log file, but for the sake of simplicity you should probably just import sys
in read-all.py
and after print()
ing out the data, call sys.stdout.flush()
Hi Gadgetoid,
that sounds exactly what i’d like to achieve!
Could you explain how to achieve this? I’ve very little experience with python
Any advuce wuld be greatly received but may lead to more questions ;)