LilyGO TTGO T-display ESP32

The LilyGO TTGO T-display ESP32 is a nice little Arduino development board with color display, battery charging interface, 2 onboard GPIO buttons and USB C connector.

Warning: Everything on these pages are provided "as is". I can not guarantee the correctness and effectiveness of the provided information and sketches. I can not be held responsible for any damage to your dev board and accessories caused by using my information and sketches.

Arduino Community logo provided by Arduino.License: Commons license CC-SA-BY-NC 3.0 

Hardware specifications

Hardware Specifications

Chipset

ESPRESSIF-ESP32 240MHz Xtensa® single-/dual-core 32-bit LX6 microprocessor

FLASH

QSPI flash 4MB

SRAM 

520 kB SRAM

Button

Reset

USB to TTL

CP2104

Modular interface

UART、SPI、SDIO、I2C、LED PWM、TV PWM、I2S、IRGPIO、ADC、capacitor touch sensor、DACLNA  pre-amplifier

Display

IPS ST7789V 1.14 Inch

Working voltage

2.7V-4.2V

Working current

About 60MA

Sleep current

About 120uA

Working temperature range

-40℃ ~ +85℃

Size & Weight

51.52 * 25.04 * 8.54mm (7.81 g)

Power Supply Specifications

Power Supply

USB 5V/1A

Charging current

500mA

Battery

3.7V lithium battery

JST Connector

2Pin 1.25mm

USB

Type-C

Wi-Fi

Standard

FCC/CE-RED/IC/TELEC/KCC/SRRC/NCC

Protocol

802.11 b/g/n(802.11n,speed up to150Mbps)A-MPDU and A-MSDU polymerization,support 0.4μS Protection interval

Frequency range

2.4GHz~2.5GHz(2400M~2483.5M)

Transmit Power

22dBm

Communication distance

300m

Bluetooth

Protocol

Meet bluetooth v4.2BR/EDR and BLE standard

Radio frequency

With -97dBm sensitivity NZIF receiver Class-1,Class-2&Class-3 emitter AFH

Audio frequency

CVSD & SBC audio frequency

Software specification

Wi-Fi Mode

Station / SoftAP / SoftAP + Station / P2P

Security mechanism

WPA / WPA2 / WPA2-Enterprise / WPS

Encryption Type 

AES / RSA / ECC / SHA

Firmware upgrade

UART download / OTA(Through network / host to download and write firmware)

Software Development

Support cloud server development / SDK for user firmware development

Networking protocol

IPv4、IPv6、SSL、TCP/UDP/HTTP/FTP/MQTT

User Configuration

AT + Instruction set, cloud server, Android / iOSapp

OS

FreeRTOS

PIN diagram

Source of image and additional pinout: http://www.lilygo.cn/claprod_view.aspx?TypeId=21&Id=1128

Additional pinout not on the picture

ADC IN: 34

ADC Power: 14

Arduino Installation instructions

Source of parts of the instructions: https://github.com/Xinyuan-LilyGO/TTGO-T-Display

Adding board to Arduino

The LilyGO TTGO T-display ESP32 is basically an ESP32 development board with some added hardware features. To be able to program the board you need to add the board to and with the Boards Manager of the Arduino IDE. Instructions can be found  on the documentation pages of Espressif: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide

Then in the Tools menu you need to setup some parameters to be able to program the LilyGO TTGO T-display ESP32. I don't whether my settings are the best but these are the settings I use:

To determine on which COM port your board connects, do the following steps:

Dependency library files: TFT_eSPI

To get the screen on the LilyGO TTGO T-display ESP32 running need the TFT_eSPI library. This is a "graphics and fonts library for ESP8266 and ESP32 processors with drivers for ILI9341, ILI9163, ST7735, S6D02A1, ILI9481, ILI9486, ILI9488, HX8357D and ST7789 based TFT displays that support SPI". 

Whilst you can install the library with the Library manager of Arduino I would advise you to install the version from Github. In that way you can be sure you get the newest version. You will be able to update the library within the Library manager or overwrite the old files manually. Be sure to check whether the manual changes you have to made are still there after an update (see below at "Configure the TFT_eSPI library to use the ST7789V in the correct way")!

Installing with the Library manager

Manually install

Configure the TFT_eSPI library to use the ST7789V in the correct way

Remark July 2nd, 2023:
It seems there is now a ready to use configuration at User_Setups/Setup18_ST7789.h. You might want to try that one to include. I haven't verified whether this works or not.

Dependency library files: Button2

This library is only needed for the demo sketch of LilyGO. If you prefer another library for handling the button presses you are free to use so. I personally like the Button 2 library. It does fit my needs quite well.

If you want to use the Button2 library you have to install it by hand: it is not present in the Library manager.

Manually install

Downloading and running the original LilyGO TTGO T-display ESP32 demo sketch

LilyGO does provide a demo sketch so that you can see what the device is capable of. This exactly the same sketch as the one which comes pre-programmed on your board as you received the board.

To download the original LilyGO TTGO T-display ESP32 demo sketch there are 2 ways to do that:

Download the individual files

Download LilyGo's Github project

Compile and upload the original LilyGO TTGO T-display ESP32 demo sketch

After the demo sketch is uploaded to the board it will automaically run the sketch and start with the TTGO bootlogo.

When the screen stays green you can press the buttons as described above.

Pressing the upper button (on this image on the right) leads you to the voltage measurement.