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("");
Serial.println("");
Serial.print("T0");
Serial.print("\t");
Serial.print("T1");
Serial.print("\t");
Serial.print("T2");
Serial.print("\t");
Serial.print("T3");
Serial.print("\t");
Serial.print("T4");
Serial.print("\t");
Serial.print("T5");
Serial.print("\t");
Serial.print("T6");
Serial.print("\t");
Serial.print("T7");
Serial.print("\t");
Serial.print("T8");
Serial.print("\t");
Serial.println("T9");
for (int i = 0; i < 10; i++){
Serial.print(touchRead(T0));
Serial.print("\t");
Serial.print(touchRead(T1));
Serial.print("\t");
Serial.print(touchRead(T2));
Serial.print("\t");
Serial.print(touchRead(T3));
Serial.print("\t");
Serial.print(touchRead(T4));
Serial.print("\t");
Serial.print(touchRead(T5));
Serial.print("\t");
Serial.print(touchRead(T6));
Serial.print("\t");
Serial.print(touchRead(T7));
Serial.print("\t");
Serial.print(touchRead(T8));
Serial.print("\t");
Serial.println(touchRead(T9));
delay(100);
}
}
I'm using the arduino IDE and the touch readings seem to work on the other pins.
Are the pins known for being unstable? Could it be a manufacturer error?