LilyGO TTGO T-Display: ESP32 with TFT LCD
Development boards with ESP32 microcontrollers come in countless variants today. For example, we already looked at the M5StickC, ESP32-CAM, and TTGO T-Journal. In this blog, we look at the LilyGO TTGO T-Display. On this board, the ESP32 is combined with a 240×135 pixel IPS TFT display and a 3.7V battery charging circuit.
LilyGO TTGO T-Display and the Arduino IDE
You can program the LilyGO TTGO T-Display with the Arduino IDE. For this, you need to have the IDE installed together with the ESP32 core for the Arduino IDE. How to do this can be found in the blog “ESP32 with Arduino IDE on Linux and Windows“. In brief:
- Download and install the Arduino IDE. For more information, you can read the blogs “Installing the Arduino IDE on Windows 10” or “Install or upgrade to the latest Arduino IDE on Linux“.
- Start the IDE and open “Preferences” via menu File > Preferences.
- Enter this URL in the “Additional Board Manager URLs” field:
- Open “Boards Manager” via menu Tools > Board > Board Manager and install the esp32 platform.
If the above is successful, select the board “ESP32 Dev Module” from the Tools > Board menu.
To use the display and the two components on the T-Display, you also need to install two libraries in the Arduino IDE:
You can download the libraries from GitHub or install them with the ‘Library Manager’ from the Tools > Manage Libraries menu.
LilyGO TTGO T-Display Select Settings
Finally, you must activate the correct display in TFT_eSPI by changing the default setting to TTGO T-Display.
In the file
TFT_eSPI/User_Setup_Select.hchange this line:
and change this line:
GPIO and pin mapping
The various parts on the development board use the following pins:
In summary, the pin mapping looks like this:
This image and more information can be found at https://github.com/Xinyuan-LilyGO. There you can also find the demo sketch that is standard on the T-Display.
Downloaded https://dl.espressif.com/dl/package_esp32_index.json and it does not have the board “ESP32 Dev Module” included but it does have “ESP FM DevKit” and “TTGO T-Watch”. Tried the TFT_Clock_Digital example which hung on upload with ESP FM DevKit, loads and verifies with TTGO T-Watch but gives a blank display and no response to buttons or touch.
I managed to get ESP Dev Module included when I downloaded the file from github.
TTGO-T1 is not usable as card type ?
Trying to get my TTGO back to the factory program but it’s not working. I followed your instructions as written.
It uploads successfully but then all I get on the display is a backlit black screen. Nothing else shows up. I can open the Serial Monitor and the buttons do what they’re supposed to (voltage reading, network scan, reset info) but nothing on the TFT. Pulling my hair out!! Any help would be appreciated.
You can follow this tutorial it worked for me after modifying the header file.
Hi have problems reading external temperature sensors. I’ve done tests with DHT22 with pull-up resistor and checked cabling and software, but nothing. I dubt i’m missing something on port selection or software configuration.