0

OSERROR: [Errno 121] Remote I/O error
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

OSERROR: [Errno 121] Remote I/O error

by BigTij on Mon Feb 10, 2020 11:32 am

I tried the sht31d adafruit sensor with an arduino uno and it worked, but when i try reading it on a raspberry pi with your python code sample and the same wiring as with my arduino circuit, i get the error: OSError: [Errno 121] Remote I/O error, and i did check if i could detect the i2c device by typing i2cdetect -y 1 and it shows up on address 0x44 just like i expected... I used the sht31d test program in python from your website i rly don't know what to do to solve this problem.

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Re: OSERROR: [Errno 121] Remote I/O error

by adafruit_support_carter on Mon Feb 10, 2020 1:48 pm

Please post a photo of your setup showing how everything is wired together.

adafruit_support_carter
 
Posts: 14475
Joined: Tue Nov 29, 2016 2:45 pm

Re: OSERROR: [Errno 121] Remote I/O error

by BigTij on Mon Feb 10, 2020 3:34 pm

red is 5v
black is gnd
blue is scl
green is sda
brown connects Vin to pull up resistors
yellow connects gnd to pull down resistors
scl and sda are both connected to a pull up resistor
adr is connected to a pull down resistor to give a 0x44 address
rst has a pull up resistor to make the chip active by default
Attachments
Snapchat-1533892451.jpg
Snapchat-1533892451.jpg (478.04 KiB) Viewed 55 times
Snapchat-1893331123.jpg
Snapchat-1893331123.jpg (285.63 KiB) Viewed 55 times
Snapchat-2047269017.jpg
Snapchat-2047269017.jpg (595.38 KiB) Viewed 55 times

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Re: OSERROR: [Errno 121] Remote I/O error

by BigTij on Mon Feb 10, 2020 3:39 pm

here is the code i used.
I also tried to add the 0x44 address in this part of the code
sensor = adafruit_sht31d.SHT31D(i2c,0x44) in case it needed it but it didnt work either.
Attachments
Snapchat-1841296494.jpg
Snapchat-1841296494.jpg (997.54 KiB) Viewed 54 times

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Re: OSERROR: [Errno 121] Remote I/O error

by adafruit_support_carter on Mon Feb 10, 2020 5:05 pm

Try removing the resistors and wiring per the guide:
https://learn.adafruit.com/adafruit-sht ... wiring-5-3

The breakout board has the necessary pull up/down resistors on it:
https://learn.adafruit.com/adafruit-sht ... ematic-7-2

adafruit_support_carter
 
Posts: 14475
Joined: Tue Nov 29, 2016 2:45 pm

Re: OSERROR: [Errno 121] Remote I/O error

by BigTij on Mon Feb 10, 2020 5:13 pm

I switched Vin from 5v to the 3.3v of the raspberry pi to supply the sensor and it seems to work better. i now see a problem in compiling tho, it says that the board module has no scl and sda pins is there a particular library i need to download? i did sudo pip3 install board. otherwise it said no module named "board" even if i installed circuitpython.

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Re: OSERROR: [Errno 121] Remote I/O error

by adafruit_support_carter on Mon Feb 10, 2020 5:16 pm

Do not explicitly install a module named board.

You need to install the Adafruit Blinka library per the instructions here:
https://learn.adafruit.com/circuitpytho ... spberry-pi
And make sure the test there works as well:
https://learn.adafruit.com/circuitpytho ... -test-3-15

adafruit_support_carter
 
Posts: 14475
Joined: Tue Nov 29, 2016 2:45 pm

Re: OSERROR: [Errno 121] Remote I/O error

by BigTij on Tue Feb 11, 2020 10:18 am

Alright, i did a whole refresh, i wrote another raspbian lite image on my pi, i reconfigured everything, redownloaded python 3.7 and followed your instructions to download the proper libraries, i did also install the sht31d library, and tested blinkatest.py it shows that my i2c and spi are ok! but when i launch the sht31d test code it tells me the same error i got from the beginning. Here is the output i get... I did remove all the resistors and now the wiring is only 3.3v of pi to Vin, Gnd to Gnd, Scl to Scl and Sda to Sda
Last edited by BigTij on Tue Feb 11, 2020 10:24 am, edited 1 time in total.

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Re: OSERROR: [Errno 121] Remote I/O error

by BigTij on Tue Feb 11, 2020 10:20 am

.
Attachments
Snapchat-1460609314.jpg
Snapchat-1460609314.jpg (754.03 KiB) Viewed 38 times

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Re: OSERROR: [Errno 121] Remote I/O error

by BigTij on Tue Feb 11, 2020 11:17 am

here is where i get an error :
sensor = adafruit_sht31d.SHT31D(i2c)
Attachments
IMG_20200211_101414.jpg
IMG_20200211_101414.jpg (792.09 KiB) Viewed 35 times

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Re: OSERROR: [Errno 121] Remote I/O error

by adafruit_support_carter on Tue Feb 11, 2020 1:37 pm

Can you post a better photo of the soldering on the header pins here:
soldering.jpg
soldering.jpg (35.83 KiB) Viewed 32 times

adafruit_support_carter
 
Posts: 14475
Joined: Tue Nov 29, 2016 2:45 pm

Re: OSERROR: [Errno 121] Remote I/O error

by BigTij on Wed Feb 12, 2020 4:09 pm

Well, i tried to reinforce the soldering and probably fried the chip because nothing is working on the arduino now. I would greatly recommend to you guys to send those sensor chip pre soldered in the future because it is quite frustrating for me to pay 15$ for a sensor that i need to solder myself with my shaky hands and throw that 15$ in the garbage because i fried it....

BigTij
 
Posts: 8
Joined: Mon Feb 10, 2020 11:22 am

Please be positive and constructive with your questions and comments.