Skip to content

support i2c gpio expanders #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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eric-humane
Copy link

@eric-humane eric-humane commented Mar 5, 2025

Allows for things like https://www.sparkfun.com/sparkfun-qwiic-directional-pad.html to be used. I have tested in my own project and it works great.

@eric-humane eric-humane force-pushed the gpio-expander branch 2 times, most recently from 3d0a575 to f20a8ef Compare March 5, 2025 15:32
@eric-humane eric-humane marked this pull request as ready for review March 5, 2025 15:45
@eric-humane eric-humane force-pushed the gpio-expander branch 2 times, most recently from f457b82 to c774c00 Compare March 5, 2025 17:14
@Spirik
Copy link
Owner

Spirik commented Mar 5, 2025

Hello there!

This looks like a really great addition! Although I have zero experience working with gpio expanders to be completely honest, so I have to trust you on this=)

Hopefully I will get some time to look closely at the code on the weekend (for some minor codestyle tweaks and documentation additions). And I will definitely have to get me some of the hardware to test it properly sometime in the future:)

One question for now: does simultaneous presses work correctly with this (i.e. in accordance with timing diagrams)? Given the example you provided they should, but just checking to be sure.

Thank you for your contribution! 🤝

@eric-humane
Copy link
Author

I will double check!

@eric-humane
Copy link
Author

eric-humane commented Apr 3, 2025

Sorry, I still haven't double checked. It appears that there are many variations of GPIO expanders with many different capabilities, that said I have been using this PR with one of these:

https://learn.adafruit.com/gamepad-qt

Which is based on Adafruit seesaw and seemingly allows multiple readings at once, where some other GPIO boards (like in my examples) aren't capable of reading all the registers at once (or perhaps just lack the necessary API interface to do so).

@Spirik
Copy link
Owner

Spirik commented Apr 3, 2025

No worries! I still haven't get myself an expander module for testing either. Just got my hands on SparkFun Red board with qwiic connector, but not the actual button/navigation module.

I wonder if it is possible to implement reasonably universal support for these, without relying on specific third-party library (like the one provided by SparkFun).

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

Successfully merging this pull request may close these issues.

2 participants