How to access BNO055 absolute orientation sensor from adafruit feather ESP8266 using its libraries?

Thread Starter

Iannis Zannos

Joined Jun 10, 2018
1
Hello,

I am trying to get data on a feather huzzah ESP8266 from a BNO055 absolute orientation sensor,
using Adafruits own in-house library for that sensor, adafruit_bno055.
I get the error described below when I try to access the sensor from the code described in
https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/circuitpython-code
Below is a complete transcript of the code that I used and the error that I got.

I am using circuit python and have the modules required on the board.
The code posted below recognizes that there is an i2c device connected and posts as array of addresses:

[40]

However, when I try to create an instance of BNO055 in python, I get an error. I.e.:

sensor = adafruit_bno055.BNO055(i2c)

Gives the error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_bno055.py", line 123, in __init__
File "adafruit_bno055.py", line 144, in _read_register
File "adafruit_bno055.py", line 143, in _read_register
File "adafruit_bus_device/i2c_device.py", line 102, in write
OSError: [Errno 5] EIO

Can someone please help me solve this problem?
Present hardware is an essential part of the project, therefore I would appreciate any help.

Iannis Zannos



======== CODE USED =========
import board
time.sleep(1.0)
print("board imported, next importing bitbangio")
import bitbangio
time.sleep(1.0)
print("imported bitbangio, next importing adafruit_bno055")
time.sleep(1.0)
import adafruit_bno055
print("imported adafruit_bno055, will try to connect i2c, in 1 sec.")
time.sleep(1.0)
print("trying bitbangio.I2C now")
i2c = bitbangio.I2C(board.SCL, board.SDA)
time.sleep(1.0)
# Following failed. Trying scan instead
# print("done, now getting sensor instance")
# sensor = adafruit_bno055.BNO055(i2c)
# print("done")
print("done, now importing machine")
time.sleep(1.0)
import machine
print("done, now getting I2C instance")
time.sleep(1.0)
i2c = machine.I2C(scl=machine.Pin(5), sda=machine.Pin(4))
print("done, now scanning i2c instance")
time.sleep(1.0)
i2caddreses = i2c.scan()
print("i2c addresses are:")
print(i2caddreses)

iani
Posts: 4
Joined: Sun Jun 10, 2018 11:02 am
 

btebo

Joined Jul 7, 2017
89
I'm not familiar with those particular Adafruit products - but I have found the forum on the Adafruit site to be magnificent. They have always helped me out promptly.

Good luck.
 
Top