Page 1 of 1

The difference in readings of the touch sensors between ESP32 and ESP32S3

Posted: Tue Apr 02, 2024 7:01 am
by ghostvisitor
When migrating the controller from ESP32S3 to ESP32, I found that the touch sensor reading on ESP32S3 is 16300 when idle, increasing to 800000 after touch. Using the same program, the touch sensor reading on ESP32 is 76 when idle, decreasing to 7 after touch. What could be the reason for this difference, and is there a way to switch the reading behavior of ESP32 to match that of ESP32S3?


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(T1));  // get value using T1
  delay(200);
}

Re: The difference in readings of the touch sensors between ESP32 and ESP32S3

Posted: Wed Apr 03, 2024 4:04 pm
by liaifat85
The configuration of touch sensors of ESP32 and ESP32-S3 are different. You can see the following documents here:
https://docs.espressif.com/projects/esp ... h_pad.html
https://docs.espressif.com/projects/esp ... h_pad.html

Re: The difference in readings of the touch sensors between ESP32 and ESP32S3

Posted: Wed Apr 03, 2024 7:47 pm
by lbernstone
They are different hardware devices between the original and S series soc's.
https://github.com/espressif/arduino-es ... .h#L51-L57
You can use the macros to have inverted functionality for each type, like in https://github.com/espressif/arduino-es ... .h#L74-L90