Documentation
¶
Overview ¶
Capacitive touch sensing example.
This capacitive touch sensor works by charging a normal GPIO pin, then slowly discharging it through a 1MΩ resistor and seeing how long it takes to go from high to low.
Use as follows:
- Change touchPin below as needed.
- Connect this pin to some metal surface, like a piece of aluminimum foil. Make sure this surface is covered (using paper, Scotch tape, etc).
- Also connect this same pin to ground through a 1MΩ resistor.
This sensor is very sensitive to noise on the power source, so you should probably try to limit it by running from a battery for example. Especially phone chargers can produce a lot of noise.
Click to show internal directories.
Click to hide internal directories.