Skip to content

Conversation

@intermernet
Copy link

This PR adds support for the Adafruit BNO085 (CEVA BNO08x) 9DoF sensor. It's based off the Adafruit Arduino package at https://github.com/adafruit/Adafruit_BNO08x .

It implements most of the CEVA SH-2 / SHTP protocol whcih could be potentially moved into a separate package, but currently very few devices support it, so I have included it in this package

It has been tested with an Adafruit Metro 2350 and it seems to work well.

@deadprogram
Copy link
Member

Thank you very much for working on this @intermernet

Perhaps you might want to look at the new pin package to avoid using the machine package directly.

Please see https://github.com/tinygo-org/drivers/blob/dev/internal/pin/internalpin.go

What do you think?

@intermernet
Copy link
Author

@deadprogram I'll look at the pin package and see what refactoring I can do. Thanks for the heads up! I didn't know about it!

@intermernet
Copy link
Author

@deadprogram I don't think the pin package applies to this driver, but I was erroneously using machine.I2C instead of the drivers.I2C interface. I have fixed this and the only remaining machine import is in the example code.

There are a bunch of linting errors related to unused functions/methods/consts/vars etc. These are mainly due to the implementation of the SH2 / SHTP protocols based on their respective specifications, and some of this isn't required in this driver.

There are also a few place-holders for more advanced functionality which isn't yet implemented.

What would you like me to do with these? I can comment them out and add TODOs, I can delete them altogether, or I can leave them in as they aren't actually causing errors and may help anyone else trying to extend this code in the future.

@deadprogram
Copy link
Member

I was referring to https://github.com/tinygo-org/drivers/pull/809/files#diff-97e43ef0dd25e88f79e809472ccaf81ff6cf2010147aac700799a5a1aea595bdR35-R62 that seems like better off removed and replaced by using pin package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants