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

OSError: [Errno 5] EIO #8

Open
Mathemmagician opened this issue Feb 24, 2022 · 3 comments
Open

OSError: [Errno 5] EIO #8

Mathemmagician opened this issue Feb 24, 2022 · 3 comments

Comments

@Mathemmagician
Copy link

Posting here mainly for visibility as the solution is provided below.


When running bno_test.py, I sometimes get

Traceback (most recent call last):
  File "<stdin>", line 44, in <module>
  File "bno055_base.py", line 86, in <lambda>
  File "bno055_base.py", line 118, in scaled_tuple
  File "bno055_base.py", line 200, in _readn
OSError: [Errno 5] EIO

Which I was able to resolve by reducing the frequency, i.e.

before: i2c = machine.I2C(1, sda=machine.Pin(14), scl=machine.Pin(15))
after: i2c = machine.I2C(1, sda=machine.Pin(14), scl=machine.Pin(15), freq=5000)

@peterhinch
Copy link
Contributor

This can be caused by pullup resistors with too high a value or wires too long.

@Mathemmagician
Copy link
Author

Interesting. My wires are very short, and the pull-up resistors are built it. Using Adaftuit's https://www.adafruit.com/product/2472

@peterhinch
Copy link
Contributor

I'm baffled. I used the same breakout in my testing and in many hours of work developing a Quaternion class and never saw this error.

In general I2C interfaces which work at low clock rates but not at higher ones are often the result of capacitive loading, which can be countered by lower value pulups. The Adafruit pullups are 10KΩ which is rather high, you might try adding pullups to 3.3V in the region of 1KΩ to 2KΩ. But this is clutching at straws, I never found a need.

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