LilyGo T-Deck Development Board
Code name: LILYGO_T_DECK
LilyGo T-Deck development board is based on esp32s3 microcontroller and uses xtensa architecture. This board has a maximum CPU frequency of 240 MHz and a flash size of 16MB.
About LilyGo T-Deck
π The LilyGo T-Deck is a versatile development device featuring an ESP32-S3FN16R8 dual-core processor with integrated Wi-Fi and Bluetooth 5 (LE). It boasts a 2.8-inch IPS LCD (320x240) touch screen, a mini keyboard, and a trackball, making it ideal for portable applications. β‘
π‘ With support for LoRa transceiver (SX1262) at various frequencies (433/868/915 MHz), it enables long-range communication for IoT projects. The device comes with 16MB Flash and 8MB PSRAM, providing ample memory for complex applications.
πΎ Additional features include a microphone, speaker, and optional GPS module, enhancing its functionality for diverse use cases.
Where to Buy LilyGo T-Deck
Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.
LilyGo T-Deck Technical Specifications
π₯οΈ Display
π°οΈ Connectivity
π§ Microcontroller
β¨ Features
- 48 digital IO pins
- 46 external interrupt pins
- 20 analog input pins
- 27 PWM pins
LilyGo T-Deck Pinout
The LilyGo T-Deck pinout offers multiple GPIOs with various functionalities:
IO1 to IO3: GPIO, Touch, ADC
IO10 to IO13: SPI interface (CS, D, CLK, Q)
IO16: ADC
IO17 and IO18: UART (TX, RX)
IO38 to IO48: LCD data lines and control signals
Additionally, power pins like 3V3, 5V, and GND are available for peripheral connections.
β Safe Pins to Use
For general GPIO usage, these are the safest and most flexible choices:
Why Are These Pins Safe?
- Not involved in bootstrapping β No impact on device boot mode or system startup
- Not linked to flash memory or PSRAM β Won't interfere with storage or memory access
- Not dedicated to USB or JTAG β Free for general use without affecting debugging
- No special hardware connections β Freely assignable without internal conflicts
β οΈ Pins to Avoid or Use with Caution
Some pins are reserved for critical functions like bootstrapping, JTAG debugging, USB communication, and flash memory operations. Misusing these pins may lead to boot failures, programming issues, USB conflicts, or disruptions in flash storage.
Critical Pin Categories:
- π οΈ Strapping Pins: Control boot behavior and flash voltage selection
- π JTAG Debugging Pins: Required for low-level debugging
- π USB Communication Pins: Used for USB Serial/JTAG communication
- β‘ Flash Memory & SPI Pins: Connected to SPI flash memory and PSRAM
- π‘ UART Serial Communication Pins: Used for debugging and firmware uploads
| PIN | Label | Reason | Function |
|---|---|---|---|
| IO3 | GPIO3 | Sampled at reset to select JTAG interface (USB Serial/JTAG controller vs. external pins). Improper use can disable external JTAG or alter debug interface. | π οΈ Strapping |
| IO10 | FSPICS0 | Used to select the external flash chip. It is required for flash access and cannot be repurposed without losing flash connectivity | β‘ Flash |
| IO11 | FSPID | Used as a data line for flash (and in-package PSRAM). It should not be used as GPIO when the flash/PSRAM is in use. | β‘ Flash |
| IO12 | FSPICLK | Drives the flash (and PSRAM) clock. This critical signal must be reserved for memory and not used as general GPIO. | β‘ Flash |
| IO13 | FSPIQ | Used as a data line for flash/PSRAM transfers. Not available for other uses when flash/PSRAM is connected. | β‘ Flash |
LilyGo T-Deck Pin Mappings
This development board provides 48 digital IO pins, out of which 46 can be used as external interrupt pins , 20 as analog input pins and 27 pins have Pulse-Width Modulation (PWM) .
| Pin | Function | ESP Pin | Input/Output | Description |
|---|---|---|---|---|
| 1 | 3V3 | 3.3V | POWER OUTPUT | 3.3V power output |
| 2 | GND | GND | POWER GROUND | Ground connection |
| 3 | 5V | 5V | POWER INPUT | 5V power input for the board |
| 4 | IO1 | GPIO1 | BIDIRECTIONAL | GPIO, Touch, ADC |
| 5 | IO2 | GPIO2 | BIDIRECTIONAL | GPIO, Touch, ADC |
| 6 | IO3 | GPIO3 | BIDIRECTIONAL | GPIO, Touch, ADC |
| 7 | IO10 | SPI_CS | BIDIRECTIONAL | GPIO, SPI Chip Select |
| 8 | IO11 | SPI_D | BIDIRECTIONAL | GPIO, SPI Data |
| 9 | IO12 | SPI_CLK | BIDIRECTIONAL | GPIO, SPI Clock |
| 10 | IO13 | SPI_Q | BIDIRECTIONAL | GPIO, SPI Q |
| 11 | IO16 | ADC2_CH5 | BIDIRECTIONAL | GPIO, ADC |
| 12 | IO17 | U1_TXD | BIDIRECTIONAL | GPIO, UART TX |
| 13 | IO18 | U1_RXD | BIDIRECTIONAL | GPIO, UART RX |
| 14 | IO21 | GPIO21 | BIDIRECTIONAL | GPIO |
| 15 | IO38 | LCD_BL | OUTPUT | GPIO, LCD Backlight |
| 16 | IO39 | LCD_D0 | OUTPUT | GPIO, LCD Data 0 |
| 17 | IO40 | LCD_D1 | OUTPUT | GPIO, LCD Data 1 |
| 18 | IO41 | LCD_D2 | OUTPUT | GPIO, LCD Data 2 |
| 19 | IO42 | LCD_D3 | OUTPUT | GPIO, LCD Data 3 |
| 20 | IO45 | LCD_D4 | OUTPUT | GPIO, LCD Data 4 |
| 21 | IO46 | LCD_D5 | OUTPUT | GPIO, LCD Data 5 |
| 22 | IO47 | LCD_D6 | OUTPUT | GPIO, LCD Data 6 |
| 23 | IO48 | LCD_D7 | OUTPUT | GPIO, LCD Data 7 |
| 24 | IO5 | LCD_RES | OUTPUT | GPIO, LCD Reset |
| 25 | IO6 | LCD_CS | OUTPUT | GPIO, LCD Chip Select |
| 26 | IO7 | LCD_DC | OUTPUT | GPIO, LCD Data/Command |
| 27 | IO8 | LCD_WR | OUTPUT | GPIO, LCD Write |
| 28 | IO9 | LCD_RD | OUTPUT | GPIO, LCD Read |
| 29 | IO15 | LCD_POWER_ON | OUTPUT | GPIO, LCD Power Enable |
| 30 | IO4 | LCD_BAT_VOLT | INPUT | GPIO, Battery Voltage Sense |
| 31 | IO14 | BUTTON | INPUT | User Button |
| 32 | IO20 | MIC | INPUT | Microphone Input |
| 33 | IO22 | SPEAKER | OUTPUT | Speaker Output |
| 34 | IO23 | LOADER | OUTPUT | Flash Loader |
| 35 | IO24 | KEYBOARD | INPUT | Keyboard Input |
| 36 | IO25 | TRACKBALL | INPUT | Trackball Sensor |
| 37 | IO26 | GPS_RX | INPUT | GPS Module RX |
| 38 | IO27 | GPS_TX | OUTPUT | GPS Module TX |
| 39 | IO28 | LORA_CS | OUTPUT | LoRa Chip Select |
| 40 | IO29 | LORA_RST | OUTPUT | LoRa Reset |
| 41 | IO30 | LORA_IRQ | INPUT | LoRa Interrupt Request |
| 42 | IO31 | EXPANSION | BIDIRECTIONAL | Expansion GPIO |
| 43 | IO32 | EXTRA | BIDIRECTIONAL | Extra GPIO |
LilyGo T-Deck Pins Mapping Arduino IDE
Below you can find the LilyGo T-Deck pinout. This development board provides 48 digital IO pins, out of which 46 can be used as external interrupt pins, 20 as analog input pins and 27 pins have Pulse-Width Modulation (PWM).
| Pin | Analog | Touch | PWM | Other |
|---|---|---|---|---|
| 0 | BUTTON_1 | |||
| 1 | A0 | T1 | PWM | |
| 2 | A1 | T2 | PWM | |
| 3 | A2 | T3 | PWM | |
| 4 | PWM | BAT_VOLT | ||
| 10 | A9 | T10 | PWM | SS |
| 11 | A10 | T11 | PWM | MOSI |
| 12 | A11 | T12 | PWM | SCK |
| 13 | A12 | T13 | PWM | MISO |
| 17 | A16 | PWM | SCL | |
| 18 | A17 | PWM | SDA | |
| 43 | PWM | TX | ||
| 44 | PWM | RX |
Default Tools for LilyGo T-Deck
| Bootloader tool | esptool_py |
| Uploader tool | esptool_py |
| Network uploader tool | esp_ota |
| Bootloader address | 0x0 |
| Flash mode | dio |
| Boot mode | qio |
| PSRAM type | opi |
| Maximum upload size | 3072 Kb (3145728 B) |
| Maximum data size | 320 Kb (327680 B) |
The LilyGo T-Deck development board by default uses esptool_py uploader tool, esp_ota network uploader tool for Over-the-air (OTA) uploads and esptool_py bootloader tool. The bootloader starts at address "0x0". Flash mode and boot mode for LilyGo T-Deck development board by default is dio and qio respectively. The board uses opi PSRAM type. When using Arduino IDE, the maximum sketch upload size is 3072 Kb (3145728 B) and maximum data size for variables is 320 Kb (327680 B).





