Hi all... I'll try to be as detailed as I can so as to explain what I am trying to accomplish.
I have recently purchased several LilyGo ESP32S3 boards, namely the T-Display S3, the T-Display S3 Touch, and the T-Embed S3. I have been writing scripts to do various tasks and they all make use of the excellent TFT_eSPI library. However, for whatever reason the T-Embed board uses different settings in the /User_Setup.h and /User_Setup_Select.h files for it to be used correctly with the TFT_eSPI library. After several hours yesterday I figured this out and managed to get the T-Embed board working fine with my code.
But today... when I came to use the other two boards, I found that they no longer display anything when yesterday (before I updated the TFT_eSPI libraries etc) they were all working fine. I have since discovered that of course the boards use different settings in the files mentioned above i.e. to define the specifics of the board, and reading some of the //comments in the files I see this is of course by design, thus allowing multiple boards to be used with essentially the same library. When I once again updated the relevant lib folders etc. the two other boards worked fine once again. But... you know what's coming now... the T-Embed board stopped working and I found myself back in the same position I was in yesterday!
Hence doing some research today finding out about all this stuff, and needing to figure out how to use multiple TFT_eSPI libraries. Therein lies my question.
How do you use multiple versions of a library with different sketches, specifically the TFT_eSPI library? I appreciate one can hard-code the location of the library in the #include statement to directly reference the file, but then if I move the file or folder etc it all goes awry again.
Right now I have the version of TFT_eSPI required to correctly run the first two boards installed in my Arduino/libraries folder, and in each of the files that uses it, I have #include "TFT_eSPI.h", but of course when I try to use the T-Embed board this library won't cut the mustard because the User_Setup.c and User_Setup_Select.h files are referencing the wrong boards!
How do I set up the environment such that I can use different installations of the library, with different settings for each board I use? Where do I install the TFT_eSPI folder and it's files...? is it in the /lib folder that the MySketch.ino is stored in, or elsewhere...? And how do I reference that file instead of the one in the /Arduino/libraries folder? Or, do I simply copy the User_Setup.h and User_Setup_Select.h files to the same folder as the MySketch.ino file?
Hope all that makes sense and that someone can point me in the right direction please. Thanks.