Hi,
I have an Arduino Leonardo and I'd like to use the CapacitiveSensor library.
I have everything set up correctly but the sensor reading returns 0 all the time, it doesn't react to touching the sensor cable.
Can tou tell me what the issue could possibly be? Any help would be appreciated.
My configuration: BLACK - sendPin (8 ), RED - receivePin (7), WHITE - sensorPin (I touch this one).
I use a 1 MegaOhm resistor.
CapacitiveSensor cs_8_7 = CapacitiveSensor(8,7);
...
long start = millis();
long total1 = cs_8_7.capacitiveSensor(15);
Serial.print(millis() - start); // check on performance in milliseconds
Serial.print("\t"); // tab character for debug windown spacing
Serial.println(total1); // print sensor output 1
delay(10); // arbitrary delay to limit data to serial port
What I get:
0 0
1 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0