New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialisation fails due to reset in __init__. #65
Comments
what board are you using |
@r0the please include more information about what devices you're using to test. The most likely cause is that the sensor isn't yet fully operational after the reset, however the sleep in the reset function tracks with what the datasheet suggests, so it shouldn't be a problem. That said, you may wish to try increasing the sleep duration here: Please let us know if that helps, along with any other information you can provide about how the CircuitPython code is being run. |
Thanks for your quick response. @ladyada I'm using a Feather M4 Express connected to a custom-built sensor board containing the BNO055 and several other I2C-based sensors. The BNO board is not an Adafruit product, it's a Pesky BNO055 Nano Board. @siddacious I increased the sleep duration up to 5 seconds, the initialisation still fails the same way. Some additional information:
It's no big deal, since I can get it working by commenting out the reset(), it just bugs me. |
I did some digging and I think that what I'm experiencing is related to this issue:
Would you please consider to add an option to omit the reset in order to support the workaround suggested by Bosch for sensors without an external crystal? |
sounds good - please ask pesky to submit a PR, we cannot test such hardware because we odnt own that PCB |
@r0the Hello :) any luck getting the PR from pesky? let me know thanks |
Closing. Can't reproduce using Adafruit BNO055 breakout with a Feather M4: Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit Feather M4 Express with samd51j19
>>> import bno055_simpletest
Temperature: 0 degrees C
Accelerometer (m/s^2): (0.0, 0.0, 0.0)
Magnetometer (microteslas): (17.25, -30.25, -61.375)
Gyroscope (rad/sec): (-0.00218166, -0.00327249, 0.00218166)
Euler angle: (0.0, 0.3125, 3.125)
Quaternion: (0.999634, -0.0275269, -0.00280762, 0.0)
Linear acceleration (m/s^2): (0.0, 0.0, 0.16)
Gravity (m/s^2): (0.05, -0.53, 9.79)
Temperature: 23 degrees C
Accelerometer (m/s^2): (0.03, -0.54, 9.97)
Magnetometer (microteslas): (17.25, -29.875, -59.875)
Gyroscope (rad/sec): (-0.00109083, -0.00109083, 0.0)
Euler angle: (0.0, 0.3125, 3.125)
Quaternion: (0.999634, -0.0275269, -0.00286865, 0.0)
Linear acceleration (m/s^2): (0.0, 0.0, 0.16)
Gravity (m/s^2): (0.05, -0.53, 9.79) |
While executing bno055_simpletest.py, the initialisation of the BNO055 always fails with the
following error:
The error occurs in the first I2C write after the reset in
BNO055.__init__
.I'm currently porting an Arduino-based application to CircuitPython. On Arduino, the same BNO works fine with the
corresponding Adafruit library. I made some comparisons of the two libraries and noticed that the Arduino library
doesn't reset the BNO. So I removed the
self._reset()
line in and now the bno055_simpletest.py works fine.I'm not experienced enough with CircuitPython yet to see what's causing this behaviour.
The text was updated successfully, but these errors were encountered: