Hi, I'll update the docs for this - it's pretty misleading.
Just calling Puck.capSense() on its own will use D11
If you call Puck.capSense(tx,rx) with your own pins, you need a 1M resistor between the tx and rx pins, and to connect the thing you're checking to the rx pin.
Originally Puck.js was going to use the NFC ring for capacitive sensing, but when I started trying it with devices in a case, it was almost unusable (it couldn't reliably detect a hand over it) so I had to switch to just having a pin set up for it (D11) - it looks like I forgot to change the documentation for the function.
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, I'll update the docs for this - it's pretty misleading.
Puck.capSense()
on its own will use D11Puck.capSense(tx,rx)
with your own pins, you need a 1M resistor between the tx and rx pins, and to connect the thing you're checking to the rx pin.Originally Puck.js was going to use the NFC ring for capacitive sensing, but when I started trying it with devices in a case, it was almost unusable (it couldn't reliably detect a hand over it) so I had to switch to just having a pin set up for it (D11) - it looks like I forgot to change the documentation for the function.