CapSense Arduino Library

Circuit for One Electrode

Arduino Library

Download Capacitive Sensing Arduino Library and install.

Library Guide

Read the page about how the library works on Arduino.cc. This is also where newer versions of the library as it is updated. There is a version 5 for non-AVR boards.

Example Code

After installing library, in the Arduino software navigate to Examples > Capacitive Sensor > CapacitiveSensorSketch. This example code will read three electrodes connected to pins 2, 6 and 8 with 4 being the send pin. Change pins as they apply to your circuit.

Example Code for Reading One Cap Sensor 

Send pin is 2, receiving pin (electrode) is 3. Change pins as they apply to your circuit.