Notifications
Clear all

Does anyone know what this error message means?

3 Posts
2 Users
3 Likes
1,868 Views
(@bill21)
Member
Joined: 4 years ago
Posts: 4
Topic starter  

Hi

 

Does anyone know what this error message means?

 

Traceback (most recent call last):

            File “PiToArduino.py”, line 16, in <module>

                        Bus.write_byte(addr, 0x1)

OSError:         [Error 121] Remote I/O error

 

I am repeating Bill’s experiment to hook up a Raspberry pi to an Arduino and test it by switching the LED on and off. This was working perfectly as a test before installing the two boards into my project.

 

I opened the Python program in the terminal and got the prompt as bellow, so far so good.

 

Enter 1 for ON or 0 for OFF

 

I entered 1 and hit enter.

>>>>   1

 

I got this error.

 

Traceback (most recent call last):

            File “PiToArduino.py”, line 16, in <module>

                        Bus.write_byte(addr, 0x1)

OSError:         [Error 121] Remote I/O error

 

I’m a bit stuck because both the programs for the Arduino and Raspberry Pi 3b worked before and have not been edited since.

 

I’ve double-checked the code, which is exactly the same as Bill’s experiment.

 

I’ve double-checked the wiring, which is correct.

 

I2C is still enabled.

 

Power is getting from the Raspberry to the Arduino.

 

I’ve reloaded the Arduino program

 

All with the same result. So I’m wondering if anyone knows what this error means so I can troubleshoot the correct problem.

 

Thanks

 

Bill21


   
Quote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@bill21

The message indicates that your rpi cannot send  1 (or 0x1) to the bus address 'addr'.  I assume that addr = 0x8 as per bills code.   Why it cannot send is not revealed by the error message.   2 things to check. Firstly do a i2cdetect -y 1 and see if it finds your 0x8 i2c device (your aduino) and secondly do another check of your wiring.  Not just a peep, but change all the wires to other wires and ensure a good connection.  

If things are still not working then consider exactly what are the differences between your test and your latest incarnation with 2 boards. Longer wires? some small difference in your code.  Do a google of '[Error 121] Remote I/O error' and mostly the answer is to do with the wiring, but you will find other hints of what may be amiss as well.

 


   
ReplyQuote
(@bill21)
Member
Joined: 4 years ago
Posts: 4
Topic starter  

Thanks Byron, I appreciate your help 😀 

 

Bill21


   
ReplyQuote