0

At the moment I am trying to get readings of pressure from a BMP180 on a Raspberry Pi (OS : Noobs)

So far, I have been successful with connecting the device with the pins and the I2C is detecting the BMP180.

When I check using i2cdetect this is shown:

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 

which most likely means that the BMP180 is connected properly and I successfully enabled I2C.

However when I try to run the example code of the Adafruit_Python_BMP on the github page this error is shown:

Traceback (most recent call last):
  File "simpletest.py", line 37, in <module>
    sensor = BMP085.BMP085()
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_BMP-1.5.4-py3.7.egg/Adafruit_BMP/BMP085.py", line 69, in __init__
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_BMP-1.5.4-py3.7.egg/Adafruit_BMP/BMP085.py", line 72, in _load_calibration
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.4-py3.7.egg/Adafruit_GPIO/I2C.py", line 202, in readS16BE
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.4-py3.7.egg/Adafruit_GPIO/I2C.py", line 179, in readS16
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.4-py3.7.egg/Adafruit_GPIO/I2C.py", line 166, in readU16
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO-1.1.5-py3.7.egg/Adafruit_PureIO/smbus.py", line 224, in read_word_data
OSError: [Errno 121] Remote I/O error

The tutorials/websites I used were these: https://learn.adafruit.com/using-the-bmp085-with-raspberry-pi/using-the-adafruit-bmp-python-library https://www.instructables.com/id/Raspberry-Pi-Weather-Station-3/

Diagram that I used as a guide to connect the BMP180: Diagram

Please note that I did not solder the pins but they are embedded in the breadboard and the wires are connected as shown in the diagram.

Am I missing something or is there a solution to this please?

GarXik
  • 1
  • 2
  • 1
    Welcome to the forum. NOOBS is a loader not the O/S - You can tell the version of the O/S by the command cat /etc/os-release. Did you run the test program using sudo or just as Pi? –  May 20 '20 at 21:20
  • 1
    Check your connections and add clear photos. The error is a typical symptom of loose or erratic connections. – joan May 20 '20 at 21:43
  • 1
    @Andryroo I ran both sudo using the terminal and pi and both yield the same errors. – GarXik May 20 '20 at 21:54
  • 1
    @joan This can be the problem since I did not solder my BMP180. As for the pictures I will include a diagram that I used as a guide and edit the post. – GarXik May 20 '20 at 21:55
  • 1
    Have a look at https://stackoverflow.com/questions/52735862/getting-ioerror-errno-121-remote-i-o-error-with-smbus-on-python-raspberry-w - different device but possibly a similar problem... –  May 20 '20 at 22:05
  • 1
    @Andryoo I will try this out tomorrow and let you know how it goes. However, I doubt it has to do with that. Any bus modifications should be handled by the Adafruit modules installed but I just yield loads of errors from the modules for some reason.

    On a seperate note, can the pins of the BMP180 be directly connected to the Raspberry Pi Pins using F-F wires? Maybe the connection is better like that?

    – GarXik May 20 '20 at 22:15
  • 1
    Yes you can connect without the breadboard but given the device is detected at the correct address I'm not convinced it's a hardware issue. –  May 20 '20 at 23:48
  • This Errno121 Q&A might help: Rpi Python I2C IOError: [Errno 121] Remote I/O error Problem. How to fix it? Asked 2010apr28 Viewed 173 times https://raspberrypi.stackexchange.com/questions/97995/how-to-communicate-with-navio2-raspberry-pi-3-to-ard-ltc1867-using-i2c-protocol/97996#97996. Good Luck. Cheers. – tlfong01 May 21 '20 at 01:04
  • One more thing, you might be using a too old (Wheezy or older) or too new (using Circuit Python) AdaFruit BMP180 library, or a not too Rpi compatible Circuit Python library. You might like to search for "non Circuit Python" Library. These two Q&As might help: (1) "BMP180 Interface Problem": https://stackoverflow.com/questions/60274562/rpi3-bmp180-barometer-sensor-interface-problem/60292757#60292757, (2) CJMCU-8128 ... BMP280 Problem" https://raspberrypi.stackexchange.com/questions/112496/how-can-rpi3b-read-the-cjmcu-8128-ccs811-hdc1080-bmp280-3-in-1-sensors-mod/112580#112580. Cheers. – tlfong01 May 21 '20 at 01:19
  • 1
    @tlfong01 Yes this can be possible, I might give the Pimoroni BMP20 library a try and see how it goes. I can't seem to figure out adafruit at all. – GarXik May 21 '20 at 16:57
  • And in case you have no luck on Pimoroni BMP280, you might try SparkFun. I usually try AdaFruit first, then SparkFun, then Pimoroni, and lastly WaveShare: (1) "SparkFun BME280 Python Library sparkfun/Qwiic_BME280_Py (Latest commit edb3f31 on Jul 16, 2019) - 2019": https://github.com/sparkfun/Qwiic_BME280_Py,

    (2) "SparkFun sparkfun/Qwiic_I2C_Py (Latest commit f4dba48on Dec 14, 2019) - 2019": https://github.com/sparkfun/Qwiic_I2C_Py,

    (3) "SparkFun Qwiic_I2C_Py Docs - 2019": https://qwiic-i2c-py.readthedocs.io/en/latest/index.html. Good Luck. Cheers.

    – tlfong01 May 22 '20 at 03:58

0 Answers0