Following the link you gave "latest stable release" and "latest development release" are both v1.04 from october 19, but the fix was checked in december 19. This only adds to my confusion.
| Note, it is more likely that the paint on your board is incorrect rather than the pins being switched.
That was also my first reaction, but it shows on very different esp32 boards and only with
touchRead() while analogRead() is taking the right pin.
I have a function to see the values as a horizontal bar graph to check things like touch interrupt level or values from analog sensors.
So if I touch pin 32 and show analogRead(32) I see the mains hum flashing by on the serial monitor:
Code: Select all
*A32 0 0
*A32 1751 ****************************
*A32 2642 ******************************************
*A32 602 **********
*A32 496 ********
*A32 406 *******
*A32 332 ******
*A32 267 *****
*A32 210 ****
*A32 158 ***
*A32 109 **
*A32 68 **
*A32 39 *
*A32 10 *
*A32 0 0
*A32 1063 *****************
*A32 607 **********
*A32 635 **********
*A32 651 ***********
*A32 1706 ***************************
*A32 1408 ***********************
*A32 1168 *******************
*A32 939 ***************
*A32 701 ***********
*A32 528 *********
*A32 386 *******
*A32 286 *****
*A32 206 ****
*A32 144 ***
*A32 94 **
*A32 55 *
*A32 31 *
*A32 9 *
*A32 0 0
while A33 stays quiet, as it should be.
Pins are *not* swapped with analogRead().
touchRead(32) does not show much activity when touching pin 32 but
touchRead(33) does (still touching pin 32).
Pins 32,33 *are* swapped for touchRead().
Code: Select all
*T33 75 *******************************
*T33 76 *******************************
*T33 75 *******************************
*T33 76 *******************************
*T33 75 *******************************
*T33 28 ************ <<<< here I touch pin 32 (*not* pin 33)
*T33 5 ***
*T33 6 ***
*T33 7 ***
*T33 5 ***
*T33 4 **
*T33 5 ***
*T33 4 **
*T33 5 ***
*T33 5 ***
*T33 4 **
*T33 5 ***
*T33 4 **
*T33 5 ***
*T33 15 ******* <<< pin 32 released
*T33 72 *****************************
*T33 17 *******
*T33 5 ***
*T33 68 ****************************
*T33 43 ******************
*T33 71 *****************************
*T33 73 ******************************
*T33 71 *****************************
*T33 70 *****************************
*T33 69 ****************************
| AFAIK, the pin numbers are directly passed through to the touch API.
no, I don't think so. They get translated to the TOUCH_PAD_NUM. See
https://docs.espressif.com/projects/esp ... h_pad.html