I couldn’t get the touch sensor sketch of Module 2, Unit 2 in the ESP32 course to work correctly until I added the following statement to the sketch
pinMode (touchPin, INPUT);
4 Answers
Hello James, it shouldn’t be necessary that pinMode()… According tot he official examples and documentation doing
touchRead();
Should work without having to set a pinMode… Which ESP32 board are you using? Are you using the latest version of the ESP32 add-on for the Arduino IDE?
Hello Rui,
I am using the ESPRESSIF ESP32 DEVKITV1. I am using the latest version of the ESP32 add-on for the Arduino IDE.