adafruit / Adafruit_CircuitPython_BNO08x

Helper library for the Hillcrest Laboratories BNO080 IMU
MIT License
22 stars 29 forks source link

Help!Raspberry PI3 conected to BNO080 are having problems. #31

Open WSC0815 opened 2 years ago

WSC0815 commented 2 years ago

An unknown error occurred when using the raspberry PI to connect to the BNO080 sensor via i2C.

I completely follow the tutorial configuration and run the example, but there are the following problems, I don't know how to do, I hope someone can help me, thank you very much!

This is the code I used.(It is the same as the test code in the library.) code:

import board import busio

from adafruit_bno08x.i2c import BNO08X_I2C from adafruit_bno08x import BNO_REPORT_ACCELEROMETER

i2c = busio.I2C(board.SCL, board.SDA) bno = BNO08X_I2C(i2c) bno.enable_feature(BNO_REPORT_ACCELEROMETER)

while True: accel_x, accel_y, accel_z = bno.acceleration # pylint:disable=no-member print("X: %0.6f Y: %0.6f Z: %0.6f m/s^2" % (accel_x, accel_y, accel_z))

9BEA9C16-72B7-47E5-8826-7C8CD0F4856D

WSC0815 commented 2 years ago

thanks a lot!

caternuson commented 2 years ago

Can you repost the screen cap of the issue, or the text of the error message. The first post attachment didn't come through for some reason.

WSC0815 commented 2 years ago

Can you repost the screen cap of the issue, or the text of the error message. The first post attachment didn't come through for some reason.

Sorry, I failed to upload the picture before, now I have added the picture .

caternuson commented 1 year ago

Looks like known clock stretching issue.

See here for suggested fix: https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/python-circuitpython#python-computer-wiring-3072324

And here for more information / options: https://learn.adafruit.com/raspberry-pi-i2c-clock-stretching-fixes