Maker: Don't use pins 1, 9, 10 for captouch #20863
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a speculative improvement to captouch. This firmata code clued us in that some of the captouch pins are used for serial communication with the host machine:
In particular, I theorized that enabling captouch streaming for pins 1, 9 and 10 might interfere with serial communication. If we skipped those pins when enabling captouch, the remaining pins might be more reliable.
This PR removes captouch for those pins, and all related editor configuration (autocomplete, etc). Captouch is still behind a flag so we could ship this as an experiment and see if it improves anything. Putting captouch back on these pins will be easy too.
In local testing I've seen captouch working well after this change, but I think captouch problems have always been more pronounced on other machines so I'm not sure my own testing is useful.
It's worth noting that I'm not testing against latest Firmata anymore - Adafruit just removed some of the configuration I referenced above in response to some discussion about not being able to use those pins. Apparently they can be safely shared for serial communication and other purposes. I'm still wondering if we want to allow captouch on those pins because it generates a lot more traffic than, say, attaching a button.
What do you guys think? Worth a try?