Install TFT_eSPI library in Arduino IDE Library Manager.
Reading the TFT_eSPI GitHub page, if you update TFT_eSPI then it will over-write your setups if they are kept within the TFT_eSPI folder. It's suggested to create a new folder in your Arduino library folder called "TFT_eSPI_Setups". You then place your custom setup.h files in there. After an upgrade simply edit the User_Setup_Select.h file to point to your custom setup file.
Here is how to prepare my custom setup file for using SPI ILI9341 on ESP32 (NodeMCU-32S).
- Create a new folder in your Arduino library folder called "TFT_eSPI_Setups"
- Copy default User_Setup.h (checked it match with using SPI ILI9341) to "TFT_eSPI_Setups" folder, rename it if you want.
Connect the display module to ESP32 dev. board accordingly.
The display under test is 2.4inch SPI Module ILI9341 SKU:MSP2402.
Done. Now you can load examples of TFT_eSPI.
~ ESP32 (Arduino) ADC (Analog to Digital Converter), analogRead() and plot on 2.4" 320X240 Display (SPI ILI9341).
~ ESP32 get time from pool.ntp.org (timeserver) display on 320x240 SPI ILI9341 Screen.
~ ESP32 (NodeMCU-32S) capture Analog input, display on SPI ILI9341 screen in waveform, base on Timer Interrupt.