Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError: [Errno 5] Input/output error #2

Open
Neocramencer opened this issue Nov 12, 2014 · 3 comments
Open

IOError: [Errno 5] Input/output error #2

Neocramencer opened this issue Nov 12, 2014 · 3 comments

Comments

@Neocramencer
Copy link

Hey,

i want to use your python Version in a script. Currently iam using the C Version of emsystech and this is running fine. So i just used your python script but this is giving me the IO Error: IOError: [Errno 5] Input/output error, even if i run it with sudo.

I also changed the I2C Device Number to 1 because iam using an actual raspberry Version.
What can i do?

Thanks
Marc

@jaques
Copy link
Owner

jaques commented Nov 13, 2014

Hi Marc,

I've only got a revision 1 Raspberry Pi, so I use I2C device 0. As I understand it, if you have a newer revision 2 Raspberry Pi you need to use I2C device 1.

I get the same error as you when I tried changing mine to device 1. It might be worth double checking with i2cdetect (this must be run as root as well) that device 1 is correct.

On my machine, there's nothing on device 1.

pi@raspberrypi ~/sht21/sht21_python $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

but you can see sht21 on device 0.

pi@raspberrypi ~/sht21/sht21_python $ sudo i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77

Richard.

@Neocramencer
Copy link
Author

Hi Richard,

i already checked that and changed your scriptlone to i2C device 1.
The C code from emsystech is running fine so I2C is good. But your python script gave me the IO error.

Best regards
Marc

@poohsen
Copy link

poohsen commented Sep 22, 2015

same issue here with a 512 MB raspi. emsystech code runs fine but the python code gives me "errno 5"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants