Tuesday, January 5, 2021

ESP32 + 2.4" 320X240 Display (SPI ILI9341), using TFT_eSPI, prepare user setup file.

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.


- Edit the User_Setup_Select.h file to point to the custom setup file.


- Edit the custom user setup file:

ILI9341_DRIVER is selected by default, keep it no change.


Comment and un-comment the pin assignment code as shown:

No comments:

Post a Comment