Getting started with VS Code, PlatformIo, ESP32, and ILI9488 #2555
Replies: 4 comments 3 replies
-
I have it working now. This wiki page was useful: https://github.com/Bodmer/TFT_eSPI/wiki/Installing-on-PlatformIO That said, there are some missing parts that due to the state of the library will show up as a non-functioning screen. For my use case (an ILI9488 device), I needed to provide additional values. I believe some of these are necessary for all projects. Here is the bare minimum project using Visual Studio Code with PlatformIo and using the technique of platformio.ini file modification. No library file modification needed! platformio.ini and main.cpp: void setup() tft.setRotation(1); void loop() Note that I had to include USER_SETUP_LOADED as well as SMOOTH_FONT. There are some minor errors in the wiki article. It projects like we need to have an =1 but I found it works just like the include system and is not necessary. |
Beta Was this translation helpful? Give feedback.
-
I just published an Instructables article on this to help others, and to advocate for them to use this library and participate here in this Github community. https://www.instructables.com/Using-TFTeSPI-Library-With-Visual-Studio-Code-and-/ |
Beta Was this translation helpful? Give feedback.
-
You dont need all this setup. |
Beta Was this translation helpful? Give feedback.
-
Yes, this troubled me a lot as well. As a user of the Arduino IDE platform (that is supposed to be very simple and attractive for people that don't want to edit 100+ char parameters lists for compilers, linkers etc,) I always was convinced that a "sketch" should include a definition of the board it is running on, instead of relying on some immensely long list of boards that you don't have in your lab anyway + speed of Serial, etc.). But this paragraph is a digression ;-) So, back to TFT_eSPI, I believe that the whole "USER_SETUP" stuff should be reviewed to make it user-friendly, yet it is barely documented. What I'd like to do is simply to add at the beginning of my sketch/program:
Note that the names used should be indicative of the content behind it, so it should better be sth like TFT_eSPI_Lilygo_T-display_Setup.h , but never mind. |
Beta Was this translation helpful? Give feedback.
-
I am having difficulties just getting going with this project, and the default patterns seem to be documenting everything I am not using - like Arduino IDE, Unos, and other devices. What I really want to know is: what is the easiest way to get a hello world sample going to demonstrate the TFT is working? Scenario is using Visual Studio Code with PlatformIO extensions and a 3.5 ILI9488 sensor on an ESP32 development board. I really don't want to go and modify any of the library files and keep my changes local to my project. I see that there is a platformio.ini file support, and I suspect what I need to do is look at that.
What I am looking for is something along the ideas:
The result should be compile, upload, and presto - it should be showing hello world.
The library is amazingly detailed and very configurable and has super broad support of multiple boards, architectures, communication buses, and TFT screens. From what I see, this is one of the better libraries ever written. That said, even though I understand the ease of getting 20 or so samples going by burying the settings into the header files, I think that a better pattern would be appropriate there than asking customers to change it. There is quite a learning curve until someone can figure it out, and for those of us just building our first LCD project, and don't even know if the hardware is working yet, there are just too many variables. A simple "get started here to get a Hello World sample going with the least effort" would be very helpful. Once that is running, geting into more advanced communication protocols, MISO, touch, and Flash could build on that.
Beta Was this translation helpful? Give feedback.
All reactions