Hi, I am trying to compile the sketch TouchWakeUp in your book Learn ESP32 with Arduino IDE V3.2 but I got Compilation error. It is with function: void print_wakeup_touchpad();. I get this error in both Linux and Windows 11. When I try to search: cannot convert ‘int (*)()’ to ‘touch_pad_t’ in initialization I can’t fin any answers. Please help.
/home/ronnyP/Dokument/Projekt/Arduino/Sketchbook/RandomNerd/Esp32/4_3_touch_wake_up.ino/4_3_touch_wake_up.ino.ino: In function ‘void print_wakeup_touchpad()’:
/home/ronnyP/Dokument/Projekt/Arduino/Sketchbook/RandomNerd/Esp32/4_3_touch_wake_up.ino/4_3_touch_wake_up.ino.ino:49:52: error: invalid conversion from ‘int’ to ‘touch_pad_t’ [-fpermissive]
49 | (touchPin) = esp_sleep_get_touchpad_wakeup_status();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
| |
| int
exit status 1
Compilation error: invalid conversion from ‘int’ to ‘touch_pad_t’ [-fpermissive]
Regards Ronny