0

Feather ESP32-S2 Capacitive Touch not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather ESP32-S2 Capacitive Touch not working

by WayneConnell on Sat May 21, 2022 12:59 am

I have the Adafruit ESP32-S2 Feather with BME280 Sensor - STEMMA QT (4MB Flash + 2MB PSRAM) [ID:5303]. All board functions I need work (on another sketch) except the capacitive touch function. I develop on the Arduino IDE 2.0 using the Adafruit Feather ESP32-S2 board model. I have tried the basic TouchRead.ino example on several ports with a similar very large return value (example 3440595) that does not change when pin is touched. I presume the example is complete. I have found no mention of this failure online or on this forum. Is there something else needed to enable the function? Do I have a bad device?

WayneConnell
 
Posts: 5
Joined: Tue Jul 14, 2020 1:49 am

Re: Feather ESP32-S2 Capacitive Touch not working

by mikeysklar on Sat May 21, 2022 11:43 am

Which pins have you been using for your capacitive touch testing?

Looking at the CircuitPython code there are specific pins identified for the ESP32-S2 which might not be clear if you have only been following Arduino guides and code examples.

https://learn.adafruit.com/adafruit-esp ... 3095940-18

Code: Select all | TOGGLE FULL SIZE
A4 - CircuitPython: board.A4. Arduino: T14.
A5 - CircuitPython: board.A5. Arduino: T8.
D13 - CircuitPython: board.D13. Arduino: T13.
D12 - CircuitPython: board.D12. Arduino: T12.
D11 - CircuitPython: board.D11. Arduino: T11.
D10 - CircuitPython: board.D10. Arduino: T10.
D9 - CircuitPython: board.D9. Arduino: T9.
D6 - CircuitPython: board.D8. Arduino: T6.
D5 - CircuitPython: board.D7. Arduino: T5.


There are pins other than those listed above that are touch capable on the ESP32-S2 module itself, however, the layout and circuitry on the Feather render them unusable as touch pins.

mikeysklar
 
Posts: 7753
Joined: Mon Aug 01, 2016 8:10 pm

Re: Feather ESP32-S2 Capacitive Touch not working

by WayneConnell on Tue May 24, 2022 2:22 pm

I have attempted to access 'touch' on T10, T11, T12 and T13. Other ports are used. The following is the data returned. The values change following a reset, but don't change with subsequent reads of the respective pins, even when touched.

Touch T10 = 248377
Touch T11 = 2400234
Touch T12 = 1810388
Touch T13 = 4189011

WayneConnell
 
Posts: 5
Joined: Tue Jul 14, 2020 1:49 am

Re: Feather ESP32-S2 Capacitive Touch not working

by mikeysklar on Tue May 24, 2022 4:12 pm

Can you post a short example of the code you are running that is not updating the values?

mikeysklar
 
Posts: 7753
Joined: Mon Aug 01, 2016 8:10 pm

Re: Feather ESP32-S2 Capacitive Touch not working

by WayneConnell on Thu May 26, 2022 12:30 pm

It is an incredibly simple test.

// ESP32 Touch Test

int testCntr;
void setup()
{
Serial.begin(9600);
delay(1000); // give me time to bring up serial monitor
Serial.println("ESP32 Touch Test");
testCntr = 0;
}

void loop()
{
Serial.print("Touch T10 = "); Serial.println(touchRead(T10)); // get value
Serial.print("Touch T11 = "); Serial.println(touchRead(T11)); // get value
Serial.print("Touch T12 = "); Serial.println(touchRead(T12)); // get value
Serial.print("Touch T13 = "); Serial.println(touchRead(T13)); // get value
Serial.print("Counter="); Serial.println(testCntr);
testCntr++;
delay(1000);
}

WayneConnell
 
Posts: 5
Joined: Tue Jul 14, 2020 1:49 am

Re: Feather ESP32-S2 Capacitive Touch not working

by mikeysklar on Thu May 26, 2022 5:37 pm


mikeysklar
 
Posts: 7753
Joined: Mon Aug 01, 2016 8:10 pm

Re: Feather ESP32-S2 Capacitive Touch not working

by WayneConnell on Fri May 27, 2022 1:25 am

The board manager indicates esp32 by Espressif Systems Version 2.0.3-RC1 is installed. The Arduino IDE is indicating 2.0.0-rc6. If this is the root of the 'touch' issue I have no idea how to correct this problem. Any suggestions?

WayneConnell
 
Posts: 5
Joined: Tue Jul 14, 2020 1:49 am

Re: Feather ESP32-S2 Capacitive Touch not working

by mikeysklar on Fri May 27, 2022 2:21 pm

The 2.0.3-RC1 release candidate is from late March 2022.

The 2.0.3 release is from early May (3 weeks ago). You need to be running 2.0.3. The most current release where this issue has been resolved.

https://github.com/espressif/arduino-esp32/tags

mikeysklar
 
Posts: 7753
Joined: Mon Aug 01, 2016 8:10 pm

Re: Feather ESP32-S2 Capacitive Touch not working

by WayneConnell on Fri May 27, 2022 6:35 pm

I now have the esp32 by Espressif Systems Version 2.0.3 installed. The operational results are the same. The board manager was able to find the Version 2.0.3, which I installed. I was not able to directly correlate the last link you sent with this installation. I am unfamiliar with the process to install that specific build.

WayneConnell
 
Posts: 5
Joined: Tue Jul 14, 2020 1:49 am

Re: Feather ESP32-S2 Capacitive Touch not working

by mikeysklar on Tue May 31, 2022 5:01 pm

Installing the correct version via the boards manager should be fine. Everything I have read on the arduino-esp32 indicates the same touchread API should be working.

You can open a new issue on the github repo submitting your code example. Basically cut and paste your initial post from here this forum to there. Since you are on the current stable release it could be relevant.

https://github.com/espressif/arduino-esp32/issues

mikeysklar
 
Posts: 7753
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.