adafruit / Adafruit_CircuitPython_BNO055

CircuitPython driver for BNO055 absolute orientation sensor
MIT License
85 stars 51 forks source link

Fix init i2s bus #107

Closed vertigra closed 1 year ago

vertigra commented 1 year ago
caternuson commented 1 year ago

Why this change? Is there an associated issue for this?

vertigra commented 1 year ago

These changes had to be made to run the example on Raspbian OS 10 armv71 and python 3.7

Otherwise I get an error 

Traceback (most recent call last):  File "server.py", line 20, in     import boardImportError: No module named board 

Without the board module installed. And a mistake

Traceback (most recent call last):  File "server.py", line 26, in     i2c = busio.I2C(board.SCL, board.SDA) AttributeError: module 'board' has no attribute 'SCL'

With the board module installed.

jepler commented 1 year ago

@makermelissa can you weigh in on this? The reported behavior is a surprise to me but I don't know blinka very well.

caternuson commented 1 year ago

What hardware is being used? Is this a compute module?

In general, this sounds like a setup that does not have the expected default bus. So requires the changes shown in the PR. That's fine. It's the scenario covered here: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/using-i2c-or-spi-by-device-id

But probably not something needing changes to the example code.

vertigra commented 1 year ago

What hardware is being used? Is this a compute module?

In general, this sounds like a setup that does not have the expected default bus. So requires the changes shown in the PR. That's fine. It's the scenario covered here: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/using-i2c-or-spi-by-device-id

But probably not something needing changes to the example code.

Thanks. I will check this solution