Skip to content

Add TouchIn "pull_dir" option, touchio works for RP2350 #10223

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

Closed
wants to merge 2 commits into from

Conversation

todbot
Copy link

@todbot todbot commented Apr 5, 2025

Following up on #9541, I decided to look into getting touchio working for RP2350 without causing too much API change.

Here's a first attempt. It adds a new boolean pull_dir parameter to touchio.TouchIn. Defaulting to pull_dir=False, TouchIn acts as before. If pull_dir=True and an external 1M pull-up is wired, TouchIn will now also work on RP2350.

I believe this is similar to what DanH was imagining, but much simpler. (It felt odd to me to reuse digitalio.DigitalInOut.Pull that has a strong association with built-in pull resistors)

Tested on RP2350 and RP2040.

@todbot todbot closed this Apr 5, 2025
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.

1 participant