Hi there!
I'm trying to work out how to use the #2 pin across the bottom as a capacitive touch sensor as suggested here: https://learn.adafruit.com/adafruit-clu ... ll#pinouts (about halfway down the page under GPIO).
I can't work out how to reliably do that using Arduino. Any thoughts or (boom-tish) clues?
How to use bottom fat pins as capacitive touch sensors in Ar
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- waleedkadous
- Posts: 1
- Joined: Sat Oct 12, 2019 9:33 pm
- kevinjwalters
- Posts: 1025
- Joined: Sun Oct 01, 2017 3:15 pm
Re: How to use bottom fat pins as capacitive touch sensors i
I only occasionally do Arduino programming and I've not explored the capactive touch but I did a bit of noodling and and I'll ask around to try and find you a proper answer.
It looks like it's implemented in CircuitPython as some simple code which sends a pulse to the pad as an output and then measures it as high impedance input. There's a lengthy discussion of how it was implemented for the nRF52840 in GitHub: adafruit/circuitpython nrf: implement touchio.TouchIn #1048 which ended up a time-based measurement approach. I think the code ended up in https://github.com/adafruit/circuitpyth ... le/touchio and that's used by anything which doesn't have native support in the hardware.
I see there's an Adafruit_FreeTouch arduino library but the comments and code suggest it's very SAMD21 specific and it doesn't show recent updates for SAMD51 or nRF52840.
There is code in the Adafruit_CircuitPlayground library for capacitive touch. That initially doesn't sound promising but it's been enhanced to work with the nRF52840-based Circuit Playground Bluefruit so I think all the code exists it's just a question of finding the right library or failing that best example to borrow.
It looks like it's implemented in CircuitPython as some simple code which sends a pulse to the pad as an output and then measures it as high impedance input. There's a lengthy discussion of how it was implemented for the nRF52840 in GitHub: adafruit/circuitpython nrf: implement touchio.TouchIn #1048 which ended up a time-based measurement approach. I think the code ended up in https://github.com/adafruit/circuitpyth ... le/touchio and that's used by anything which doesn't have native support in the hardware.
I see there's an Adafruit_FreeTouch arduino library but the comments and code suggest it's very SAMD21 specific and it doesn't show recent updates for SAMD51 or nRF52840.
There is code in the Adafruit_CircuitPlayground library for capacitive touch. That initially doesn't sound promising but it's been enhanced to work with the nRF52840-based Circuit Playground Bluefruit so I think all the code exists it's just a question of finding the right library or failing that best example to borrow.
- adafruit2
- Posts: 22149
- Joined: Fri Mar 11, 2005 7:36 pm
Re: How to use bottom fat pins as capacitive touch sensors i
https://github.com/PaulStoffregen/Capac ... its/master
has nRF52840 support
@kevin - please do not comment on github commits to get tech support questions answered, keep to the forums :)
has nRF52840 support
@kevin - please do not comment on github commits to get tech support questions answered, keep to the forums :)
Please be positive and constructive with your questions and comments.