-
Notifications
You must be signed in to change notification settings - Fork 1
add SPI support and example #1
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
base: main
Are you sure you want to change the base?
Conversation
Note: this should bump to 2.0.0 when released because the class name change from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about what the new constructor args should be.
You could also make a function that looks like the old class SPA06_003_I2C()
and does the I2CDevice wrapping. It should probably have a deprecation warning though too.
The latest commit has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple minor things. Definitely getting close. Thanks!
adafruit_spa06_003.py
Outdated
time.sleep(0.01) | ||
|
||
|
||
class SPA06_003_I2C(SPA06_003): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need a class? Or can this be a function?
Also, please use the warnings
module. I believe most CP builds will have it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to a function and use warnings module in the latest commit.
Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thank you!
This relies on the changes from: adafruit/Adafruit_CircuitPython_Register#59 So that should be merged before this is.
Adds SPI support by using new functionality pending addition to adafruit_register
This should be a major version bump if merged because the class name changed from the bus specific SPA06_003_I2C to the now generic SPA06_003.
Tested successfully with both SPI and I2C on
Adafruit CircuitPython 10.0.0-beta.3 on 2025-08-29; Adafruit Feather RP2040 with rp2040