I am using a Wemos Pro ESP32 development board and would like to be able to use all ten of the available capacitive touch inputs. I am able to get readings from nine of them but not T1. Here is the pin diagram for the board I have.
Running this code on my board produces no difference in reading for T1...
#define numTouchPins 10
byte touchPins[] = { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 };
byte touch[10] = {};
void setup() {
Serial.begin(115200);
delay(1000);
}
void loop() {
for( byte pin = 0; pin < numTouchPins; ++ pin ) {
touch[pin] = touchRead( touchPins[pin] );
}
for( byte i = 0; i < 10; ++i ) {
Serial.print( touch[i] );
Serial.print( "\t" );
}
Serial.println();
}
So the reason for this is that T1 is on GPIO0 which is also connected to a button labeled 0 on the board. Now I realise this is needed in order to select between the ROM serial bootloader mode and the normal execution mode... But, is there a way to change the pinmode from digital-in to touch-in once normal boot has completed? Is there something I can write in the Arduino setup() method that would make this pin behave like the other touch pins?