Yes, it's the right place! There's no dedicated capacitive sense hardware on the board itself.
Basically:
Sense pad 1 is directly connected to D5
Sense pad 2 is directly connected to D31
They're both connected to D25 via 100k resistors
This is the same way that Puck.js does it too. Puck.js uses a software polling approach which hasn't (yet) been added to Smartibot, so for now if you actually want capacitive touch you're on your own (JS execution speed likely isn't fast enough to do anything usefully).
However you could actually configure the underlying hardware to do this for you using http://www.espruino.com/NRF52LL - set up a timer to send a square wave on D25, and then when D5/D31 change you trigger a 'capture' event.
If you did something like that it'd be great if you could post it up, as it might be an interesting thing for other boards too.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
Yes, it's the right place! There's no dedicated capacitive sense hardware on the board itself.
Basically:
This is the same way that Puck.js does it too. Puck.js uses a software polling approach which hasn't (yet) been added to Smartibot, so for now if you actually want capacitive touch you're on your own (JS execution speed likely isn't fast enough to do anything usefully).
However you could actually configure the underlying hardware to do this for you using http://www.espruino.com/NRF52LL - set up a timer to send a square wave on D25, and then when D5/D31 change you trigger a 'capture' event.
If you did something like that it'd be great if you could post it up, as it might be an interesting thing for other boards too.