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

Test case randomly fails #4

Open
Grandpa-G opened this issue May 18, 2023 · 1 comment
Open

Test case randomly fails #4

Grandpa-G opened this issue May 18, 2023 · 1 comment

Comments

@Grandpa-G
Copy link

Using the test.py, I get random errors:

set relay 1 ON
set relay 2 ON
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 79, in __ident
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 62, in __check
OSError: [Errno 121] Remote I/O error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 83, in __ident
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 62, in __check
OSError: [Errno 121] Remote I/O error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 87, in __ident
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 62, in __check
OSError: [Errno 5] Input/output error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/hyperbaric/hat.py", line 6, in
r.set_relay(0, i+1, 1)
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 98, in set_relay
File "/usr/local/lib/python3.9/dist-packages/lib4relind-1.0.3-py3.9.egg/lib4relind/init.py", line 90, in __ident
RuntimeError: Unable to communicate with 4relind with exception [Errno 5] Input/output error

@alexburcea2877
Copy link
Member

Hi,
This can be happening because poor contact on the 40 pins connector, please use provided standoffs. One different cause might be the raspberry I2C port or driver witch can not handle so many requests, and for that you need to edit the example and add some delays (time.sleep(0.1) ) between card access calls.

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

2 participants