Closed dheera closed 3 years ago
I think you need to use the I2C version of the class: https://github.com/adafruit/Adafruit_CircuitPython_BNO08x/blob/master/adafruit_bno08x/i2c.py#L16
@dheera Did that fix it?
@dheera Have you been able to test? Thanks
Yes, that fixed it. Will close issue. Thanks! For anyone who lands on this page, this is how you use it:
import board
import busio
import time
import adafruit_bno08x
from adafruit_bno08x.i2c import BNO08X_I2C
i2c = busio.I2C(board.SCL, board.SDA, frequency=800000)
bno = BNO08X_I2C(i2c)
bno.enable_feature(adafruit_bno08x.BNO_REPORT_ACCELEROMETER)
bno.enable_feature(adafruit_bno08x.BNO_REPORT_GYROSCOPE)
bno.enable_feature(adafruit_bno08x.BNO_REPORT_MAGNETOMETER)
bno.enable_feature(adafruit_bno08x.BNO_REPORT_ROTATION_VECTOR)
while True:
print("acc", bno.acceleration)
print("gyr", bno.gyro)
print("mag", bno.magnetic)
print("quat", bno.quaternion)
time.sleep(0.1)
FeatherS2 CircuitPython 6.x
output: