Hi @digdoug7131815. Some other users who encountered this problem reported a solution here:
https://github.com/prenticedavid/MCUFRIEND_kbv/issues/255#issuecomment-2258971273
In
utility/mcufriend_shield.hafter line 1025 I added the include, like as follows:1024 //################################### ESP32 >############################## 1025 #elif defined(ESP32) //regular UNO shield on TTGO D1 R32 (ESP32) 1026 1027 #include "hal/gpio_ll.h" // GPIO register functions 1028 1029 #define LCD_RD 2 //LED 1030 #define LCD_WR 4
I'll provide more detailed instructions:
- Use any text editor to open the file at this path on your hard drive:
C:\Users\Doug\Documents\Arduino\libraries\MCUFRIEND_kbv\utility/mcufriend_shield.h - Scroll down to line 1025 of the file:
#elif defined(ESP32) - Add a new line after that line.
- Add the following code at that new line 1026:
#include "hal/gpio_ll.h" // GPIO register functions - Save the file.
Now try compiling or uploading the sketch again, just as you did before when you encountered that "'GPIO' was not declared in this scope" error. Hopefully this time it will work as expected.