-
Notifications
You must be signed in to change notification settings - Fork 53
Add UART functionality to library #41
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
Comments
@dherrada hiya you recently did some hacking on this library so thought this could be a good one for you to do. the sensor has both i2c and uart. the old library had both, this library only has i2c but maybe we could add uart? |
Looks like this will be interesting from a class layout perspective. Current library only has the one class for I2C. So did the old library, and determined I2C vs. UART based on what was used in constructor. That's different than most of the CP libraries that tend to have separate classes for each interface type. |
im ok with a refactor to have two classes! |
Cool. Refactor fun time! @dherrada Let me know if you're on this. |
@caternuson Yep. I'll do it. I probably won't be able to get to it until after Nov. 1 (early decision deadline for V. Tech) but I'm definitely interested in learning about this and adding uart |
@dherrada awesome. go for it. |
Could we abstract UART, I2C and SPI away instead and have the driver deal with commands? I'd rather see something like the display buses where the driver doesn't care about the transport rather than having multiple classes. |
yes we would abstract it like we do for BMx80 sensors or PN532 for an exciting look https://github.com/adafruit/Adafruit_CircuitPython_PN532/tree/master/adafruit_pn532 |
I'm thinking we'd have one driver class that takes in a standard wrapper for UART, I2C and SPI. I don't mean having a number of subclasses. I imagine there is a standard way to pack things over the different transports and by having an object to pass in, we can factor out the packing logic. |
for i2c/spi you can do that kinda cause SPI chips tend to use a standard way to mimic i2c registers. |
@caternuson If you have cycles for this, it's something that still needs to be done. Dylan is currently on other projects. |
Done with #47 |
The original Python library includes the ability to use UART with the BNO055. Please look into implementing UART in the CircuitPython library.
The text was updated successfully, but these errors were encountered: