So far so good, but when I try to run the Touch Sensor example outlined in Mod 2, Unit 2 I get the following error:
“T0 was not declared in this scope”
What am I missing?
Which ESP32 board do you have selected in your Arduino IDE (is it the ESP32 DOIT DevKit V1?)?
I’ve just checked now and unfortunately that pin definition with the T’s is not properly set to all the boards.
Instead of using T0, you’ll need to replace it with the GPIO number, for example 4 (which is the touch pin used in Module 2 Unit 2):
Does using 4 as a parameter solve the problem for you?
I recompiled the code using ESP32 DOIT DevKit V1 as the selected device and it works fine.
Is it safe to assume the ESP32 DOIT DevKit V1 will work after this?
I also ordered an ESP32 DOIT so in the future I can exactly follow the instructions.
Thanks for the quick response!
I think that using the 4 number to refer to GPIO 4 might be a better approach than using T0, because it ensure that it works for everyone. I’ll update the course to use the 4.
I think that all the other projects should work for you, even if you have the “OLIMEX ESP32-EVB” board selected. I think that Unit was the only special pin definition case that I can remember…