Skip to content

Instantly share code, notes, and snippets.

@RajatGoyal
RajatGoyal / capsense
Last active January 3, 2016 18:59
Capacitive sensing arduino without a sensor.
// readCapacitivePin
// Input: Arduino pin number
// Output: A number, from 0 to 17 expressing
// how much capacitance is on the pin
// When you touch the pin, or whatever you have
// attached to it, the number will get higher
#include "pins_arduino.h" // Arduino pre-1.0 needs this
int pintoread1=10;
int pintoread2=5;