TFT_eSPI- Library Example doesnt work in platformio , but does in arduino IDE...uploads and compiles fine in both

So I am trying to use the TFT_eSPI library, I created a new project added the library via platformio to it, made my changes to the UserSetup.h(required for pin definition). I then copied the Meter example into my main.cpp and it compiled fine, I then uploaded it to my esp32 dev board , and after upload I got a random flickering but mostly white screen. After making sure I had the screen wired correctly I double checked the pin definition, all was well. I then just tried to reupload the sketch and had same results.
I then added the library to my arduino ide , opened the same example sketch, uploaded it to the board, and it worked meters displayed instantly.
I then tried and manually put the folder into my platformio project under the lib folder and then pointed to that header file instead of loading the one from platformio. Compiled and uploaded fine, but same white flickering screen. there is literally no difference in the sketches only difference is the IDE and idk how that is causing this issue.

I would like this to work in platformio as i have a template sketch I use for all my esp devices, and whether I have to manually add the library or can use platformio, I dont really care, I just need it to work, and I have been fighting it all morning.

Any help or ideas would be appreciated.


In which file exactly did you do these changes? Did you follow Installing on PlatformIO · Bodmer/TFT_eSPI Wiki · GitHub exactly?

Thanks for the responses, well i made those changes in different places throughout, I honestly didnt come across that wiki page. I was wondering where platformio put the library, thats why i was manually pointing it or manually copying the folder into the project.

Needless to say I went through the page you linked and followed the setups. and i get the same result. All compiled and uploaded fine but white screen that seems like its flickering quite fast. but not even the slightiest of image.
went back uploaded another example in arduino ide and screen works.

I also tried the other method, although in the Wiki is says the folder should be >$PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI_ID1559/User_Setups/Setup1_ILI9341.h
but I am seeing just $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/Setup1_ILI9341.h
??am I wrong should I change it to what it shows in the wiki?