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: front
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. Arduino libraries
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.
With supplied pin headers and battery connector