Pico and BNO055 IMU
Posted: Mon Jan 03, 2022 1:37 pm
Hello
I'm trying to get my Raspberry Pi Pico to collect data from the adafruit BNO055 IMU breakout using Micropython. So far I have this code:
import adafruit_bno055
import machine
i2c = machine.I2C(0, scl=machine.Pin(1), sda=machine.Pin(0))
sensor = adafruit_bno055.BNO055_I2C(i2c)
print(sensor.temperature)
print(sensor.euler)
print(sensor.gravity)
and I am getting this error message:
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "/lib/adafruit_bno055.py", line 768, in __init__
File "/lib/adafruit_bus_device/i2c_device.py", line 50, in __init__
File "/lib/adafruit_bus_device/i2c_device.py", line 152, in __probe_for_device
AttributeError: 'I2C' object has no attribute 'try_lock'
can anyone help me?
Thanks
I'm trying to get my Raspberry Pi Pico to collect data from the adafruit BNO055 IMU breakout using Micropython. So far I have this code:
import adafruit_bno055
import machine
i2c = machine.I2C(0, scl=machine.Pin(1), sda=machine.Pin(0))
sensor = adafruit_bno055.BNO055_I2C(i2c)
print(sensor.temperature)
print(sensor.euler)
print(sensor.gravity)
and I am getting this error message:
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "/lib/adafruit_bno055.py", line 768, in __init__
File "/lib/adafruit_bus_device/i2c_device.py", line 50, in __init__
File "/lib/adafruit_bus_device/i2c_device.py", line 152, in __probe_for_device
AttributeError: 'I2C' object has no attribute 'try_lock'
can anyone help me?
Thanks