-
Notifications
You must be signed in to change notification settings - Fork 31
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
Has SPI mode been tested? #37
Comments
I see the same problem. When is it going to be fixed? I2C is hopelessly unreliable with this sensor and SPI software support is apparently non existent on Raspbery, it's hugely disappointing. |
Has anyone found a fix for this? |
|
I was bummed to find out about this, because I bought this chip specifically for its SPI support. So I tried to fix it. I got a little further, but I'm stuck. I added the SPI wake operation like so: def soft_reset(self):
"""Reset the sensor to an initial unconfigured state"""
self._dbg("Soft resetting...", end="")
data = bytearray(1)
data[0] = 1
_seq = self._send_packet(BNO_CHANNEL_EXE, data)
time.sleep(0.5)
for _i in range(3):
try:
_packet = self._read_packet()
except PacketError:
time.sleep(0.5)
# wake up sensor
self._wakepin.value = False
self._wait_for_int()
self._dbg("OK!")
# all is good! That seems to fix the initialization; reading the ID from the sensor worked. But doing any more reads gave me a packet with the continuation bit (0x80) set in the header's length field (see datasheet section 1.3.1). I'm not sure where that packet is coming from or how to handle it. In the current code, it's labeled as a "half packet" and it just throws a PacketError. I tried ignoring that packet, but I can't seem to get any more packets after that. Maybe the Arduino version can provide some inspiration to someone who is better at C++ than I am. |
hi guys is a shame that spi support doesn't work on software,i hope they fix it soon |
Hi @rotellini9809 and @JeroenDelcour , |
hey hello i'm not super expert what is axis swapping?
Il giorno mer 10 gen 2024 alle ore 22:05 Thomas Sosio <
***@***.***> ha scritto:
… Hi @rotellini9809 <https://github.com/rotellini9809> and @JeroenDelcour
<https://github.com/JeroenDelcour> ,
please check out my issue on the sparkfun library, I posted some code that
works with spi, but had some issues with axis swapping while using spi
while testing 2 bno086 (but not with i2c). Maybe you could let me know if
you also have the same problem.
—
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBUSG3BZXJBWCVAXPYGC4DYN37BBAVCNFSM6AAAAAARRI3JEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBVG4ZTCOJQGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
that axes x is written in axes y for example?
Il giorno gio 11 gen 2024 alle ore 15:00 Rotellini9809 <
***@***.***> ha scritto:
… hey hello i'm not super expert what is axis swapping?
Il giorno mer 10 gen 2024 alle ore 22:05 Thomas Sosio <
***@***.***> ha scritto:
> Hi @rotellini9809 <https://github.com/rotellini9809> and @JeroenDelcour
> <https://github.com/JeroenDelcour> ,
> please check out my issue on the sparkfun library, I posted some code
> that works with spi, but had some issues with axis swapping while using spi
> while testing 2 bno086 (but not with i2c). Maybe you could let me know if
> you also have the same problem.
>
> —
> Reply to this email directly, view it on GitHub
> <#37 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALBUSG3BZXJBWCVAXPYGC4DYN37BBAVCNFSM6AAAAAARRI3JEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBVG4ZTCOJQGM>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
I am unable to explain it clearly than I already did in the post I have linked 3 comments up... |
Oh no, this is still broken in 2024? I started with i2c, but I'm trying to use two sensors (I set one to the alternate address and the other was kept on the stock address: 0x4B 0x4A), but unfortunately the CircuitPython code only supports one sensor. I modified the code to support adding two sensors on i2c, but it hangs at the i2c instantiation of the second sensor. |
Has anybody achieved any progress in getting the BNO086 to run with SPI on a Raspberry pi? Are there any other available codebases that you could share? Would be amazing, I'd really like to have the SPI option to increase the readout rates... |
Hi j-wanner, I2C experiment: https://forums.adafruit.com/viewtopic.php?p=857930#p857930 |
I have just found that the git repo is out of date for this device. You can go to the circuit python website and download their 8xx bundles version and there is an up to date BNO08x example that should work on raspberry pi. In that library, they include the reset pin in the class definition of the BNO08x in the SPI.py file. Here is the bundle version I am working off of. |
Re this thread:
https://forums.adafruit.com/viewtopic.php?p=946036#p946036
The guide currently does not cover SPI usage.
https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/python-circuitpython
The library example has some code that looks copy-pasta'd (D9 ref'd twice, reset pin set as input) and the instantiation does not match the actual ctor:
Adafruit_CircuitPython_BNO08x/examples/bno08x_simpletest_spi.py
Lines 19 to 25 in c8c7cf0
Additionally, there does not appear to be any code in place to perform the required PS0/Wake pin assertion needed for SPI transactions:
The text was updated successfully, but these errors were encountered: