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?