-
Notifications
You must be signed in to change notification settings - Fork 7
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
Library: Can't initialize two BNO086 on one I2C bus #3
Comments
Update: Even tried on separate I2C busses, first device to .begin will initialize, second will not. Reorder and it's still the first one in the code will work, the next will not. |
Hi @iLoveAndyBaker , |
I raised an issue with the SH2 library: ceva-dsp/sh2#9 Is the closure of this SparkFun_BNO08x_Arduino_Library issue a signal that you're unwilling to add support for more than one sensor? Do you consider the limitation of running only a single sensor to be a bug that should be fixed? If so, please reopen this issue. |
Hi @rah2501 , Thank you for submitting the issue and PR on the SH2 Library. When CEVA responds and/or adds in the ability to do multiple sensors, we would be excited to adapt our library to also work with multiple sensors. For now, we will leave this issue open. Thanks again and we look forward to seeing what CEVA says. |
FYI, CEVA have completely ignored the github issue, the PR I raised and generally seem to have stopped communicating with the community. I even did some digging and found the email address of one of the engineers (David Wheeler) and tried emailing them but again, no response. Disappointing. Edit: To make it worse, a commit was made by David Wheeler to the SH2 github repository the day after I raised the issue. Feels like a bit of a "fsck you". Perhaps they didn't appreciate people pointing out flaws in their handiwork. |
I have collected the following: In the SH2 library: @rah2501 did some changes to sh2.h at ceva-dsp/sh2#10 but just copying that file over still wouldn't make it compile, and that's the extent of my expertise (I'm more of a project manager in this respect) So even though it's probably not best practices to just patch up the SH2.h that lives in the Sparkfun library, I kinda don't see how this is going to get resolved in the usual proper manner without support from the upstream CEVA people....without simply patching up this version that's sitting here in the Sparkfun library. There's nothing stopping me from doing this on my own hard drive either, but that's not very useful to anybody else. Oh and besides the whole static methods issue, there might need to be a need to call out the INT and RST per device too, because I don't see how #define BNO08X_INT xxx is going to work unless it's common across this whole SHTP bus, which I confess I hardly understand its purpose. |
CEVA says fork it and fend for ourselves. |
Hello everyone, did you fork sh2 in order to fix this problem? I am trying to connect 8 BNO086 via an I2C Multiplexer using the sparkfun library but i am running in to the same error that you described. I am a mechanical engineering student and writing my bachelor thesis, therefore i am sadly not able to write all of the code by myself. If anything worked out for you I would be very happy if you would share it with me. |
No.
I shelved my project because of this issue. Unless you have the software development resources to reimplement the driver, the BNO0xx chips are essentially useless for proper engineering. |
Thanks a lot for your response.
Do you think it should be possible to use the library if I only create one
sensor object and use only this one when I switch through the channels of
the multiplexer?
I tried doing that but it didnt work out, but I am not sure if it is
because of my lack of programming skill or because there would also be an
issue with the library. I am not sure if this would act as if I only had
one sensor connected.
If you have any idea on that I would be happy if you would let me know.
Thanks in advance
Bob Ham ***@***.***> schrieb am Di. 14. Jan. 2025 um 11:03:
… Hello everyone, did you fork sh2 in order to fix this problem?
No.
If anything worked out for you I would be very happy if you would share it
with me.
I shelved my project because of this issue.
Unless you have the software development resources to reimplement the
driver, the BNO0xx chips are essentially useless for proper engineering.
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BOO7FPJU5WADUCWMEVZUOBL2KTOFTAVCNFSM6AAAAABPVNYX62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBZGQ4TENZWGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I got it work for my purposes. I will post the fix so that anyone who has the same issue can maybe use it. The SparkFun_BNO08x_Arduino_Library library accesses the SH2 library, which uses the SHTP library, where there is a definition for MAX_INSTANCES (1) on line 148. When .begin() is applied to the sensor object, multiple steps in the SparkFun_BNO08x_Arduino_Library and the SH2 library result in the SHTP library requesting a new instance. However, since the old version only allows one instance, initialization fails, making usage impossible afterward. When this value is adjusted to the desired number of sensors to be operated via a multiplexer, initialization and data output work as expected. Here is the exact process from MAX_INSTANCES() to .begin(): shtp.c: |
Devices ACK on addresses 0x4A and 0X46, but library won't allow both to init.
RP2040 (As KB2040)
Steps to reproduce
Daisychain two BNO086 via Qwiic connectors, jump address pin on one unit, cut pullups on end unit.
Run example code:
Expected behavior
Both chips ACK and program continues with begin == false. BUT...
Actual behavior
Second to be init'd will ack, but begin returns false
I changed the library Sparkfun_BNO8x_Arduino_Library.cpp to call out the address that ACK'd
Re-ordering the initialization of the boards doesn't help. The one that goes SECOND fails.
The text was updated successfully, but these errors were encountered: