Capacitive touch.
Posted: Thu Jul 06, 2017 6:50 am
I was trying out the capacitive touch of ESP-32 using arduino IDE. this is my code :
(this is an example code in the library itself)
My question is what exactly does the touchRead() function return? It certainly does not work like a switch (as in MPR121) because as I press it with more intensity or use any other surface (metal) the value changes. what exactly is the function returning?
Code: Select all
void setup()
{
Serial.begin(115200);
delay(1000); // give me time to bring up serial monitor
Serial.println("ESP32 Touch Test");
}
void loop()
{
Serial.println(touchRead(T0)); // get value using T0
delay(1000);
}
My question is what exactly does the touchRead() function return? It certainly does not work like a switch (as in MPR121) because as I press it with more intensity or use any other surface (metal) the value changes. what exactly is the function returning?