ok,here is what i have written now, realizing my mistake with writing the library name,now after i compile it there is an error in the
long value = CS_4_2.CapacitiveSensor(30); line,saying that invalid use of class CapacitiveSensor
i am sorry but i am new to this library.
#include <CapacitiveSensor.h>
CapacitiveSensor CS_4_2 = CapacitiveSensor(4,2); // 10 megohm resistor between pins 4 & 2
void setup()
{
CS_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1
Serial.begin(9600);
}
void loop()
{
long start = millis();
long value = CS_4_2.CapacitiveSensor(30);
Serial.println(value);
delay(100);
}