Xinyuan-LilyGO / T-Display-S3

MIT License
733 stars 174 forks source link

Strange and high values returned from touch pin. #119

Closed Rollmops67 closed 1 month ago

Rollmops67 commented 1 year ago

Hello ! It's the first time I try to work with a GPIO as a Touchpin on the T-Display. (and on an ESP32) Tutorials say when I read a touchpin without touching it the value is ABOUT 100 and when I touch it, it can drop bellow 20.

My T-Display behaves completely different. When I read the pin with Serial.println(touchRead(T13)); or Serial.println(touchRead(13)); I have a value of about 12500 without a wire connected. When i solder an 3 inch long wire on pin 13 the value (without touching) rises to about 15000. When I touch it through the insulation, the value rises to about 20000 (first bump on the image bellow), and when I touch the end of the wire (insulation removed) the value climbs (slowly) to about 100000. (second bump) image

So OK, I can see a difference, but is this behaviour normal for a T-Display ? Do I have to declare something in the setup ? Thanks for any tip !

Roland

lewisxhe commented 1 year ago

Touch is easy to receive interference from external magnetic field. It is based on capacitance. I don't recommend you use touch function. TP223 may be a better choice

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.