Touch interface shows crazy numbers in ESP32-S3

The touch interface shows crazy numbers in the ESP32-S3. The serial monitor (in the script the ESP32 prints the value) outputs about 30030, when I touched it, it outputted about 100050. And when I tried to turn on/off the LED, which depends on the value of the touch interface 12, it just started turning on randomly.

what touch panel are you using? give link or show a photo?
what touch library are you using?
upload you code (using code tags </>)?

@horace I just looked, it looks like I just overflowed the variable, and hence the six-digit numbers, but why does it give me values ​​equal to 25000, if usually 10-80?

the document Arduino-ESP32 TOUCH API states
the touch_value_t touchRead(uint8_t pin) function will return touch pad value as uint16_t (ESP32) or uint32_t (ESP32-S2/S3).

running

// 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);
}

on an ESP32 displays

51
48
16
13
13
13
26
22
60
65
66
66

on an ESP32S3 displays

22822
22904
25869
85924
92841
88229
27376
28350
46296
62025
86566
55233
24128
22795
22803
22790
22783
22784
1 Like

Thank You!