Using this simple sketch
// ESP32 Touch Test
// Just test touch pin – Touch0 is T0 which is on GPIO 4.
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(4)); // get value of Touch 0 pin = GPIO 4
delay(1000);
}
This did not appear to work when I touched GPIO 4. The sketch runs, but it mostly gives me zero’s. I tried another touch GPIO (15) – and that produced only 1’s.
Sorry – I am struggling with some basics.
Thanks,
- Billy