B4R Question [Solved] MCU_FRIENDS TFT on esp32 UNO board

derez

Expert
Licensed User
Longtime User
The board I refer to is esp32 with shape of UNO :

The board accepts MCU_Friends TFT shield after changing the arduino library to the library here:
The library adds boards to the original limited number.
Explanation about a required wiring modification (solder 3 jumpers) is here: https://github.com/s60sc/Adafruit_TouchScreen

I put the library in the libraries directory of ESP32 (C:\Users\dudu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries)
In the example sketches, after changing the initialization 5 pins to
B4X:
#define LCD_CS 33 // Chip Select goes to Analog 3
#define LCD_RS 15 // LCD_RS = Register Select or LCD_CD = Command/Data goes to Analog 2
#define LCD_WR 4 // LCD Write goes to Analog 1
#define LCD_RD 2 // LCD Read goes to Analog 0
#define LCD_RESET 32 // Can alternately just connect to Arduino's reset pin
Replacing the UNO's A1-A5 pins, the sketches run nicely

Moving to B4R - I copied the library files and put them in B4R additional libraries in the rMCUFRIENDS directory. I also copied the utility directory files and put them there seeing that the original library had them.
In the program I changed only the init :
B4X:
'    mcu.Initialize(p.A3, p.A2, p.A1, p.A0, p.A4)  ' the original UNO
    mcu.Initialize(33, 15, 4,2, 32)               ' ESP32'

I got the following error:

I tried putting the utility directory in the B4R library, in the ESP32 libray - the same error
The file appears in mcufriends.cpp as include statement, I don't understand why it cannot be found.
Help please !
 

derez

Expert
Licensed User
Longtime User
I copied the files in utility to the MCU library folder in the ESP32 files, still the same error. It is looking for utility "ResolveLibrary(utility/mcufriend_shield.h)"
Edit: changed the include line in the mcufriends_kbv.cpp file to be without the "utility" Thanks
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…