Lilygo T-RGB 2.1 Round


Overview
The Lilygo T-RGB 2.1 Round is a unique circular display module featuring:
- 2.1" round LCD display with RGB interface
- Capacitive touchscreen
- ESP32-S3 microcontroller
- SD card support
- I2C interface
Hardware Features
- Display: 2.1" round LCD with RGB interface (480x480 pixels)
- Touch: Capacitive touchscreen with interrupt support
- Processor: ESP32-S3 with WiFi and Bluetooth LE
- Storage: MicroSD card slot
- Interfaces: I2C, RGB LCD
- Power: USB Type-C
GPIO Configuration
The board uses the following GPIO pins:
Display Interface
- Red Channel: GPIO02-07 (RED1-5)
- Green Channel: GPIO09-14 (GREEN0-5)
- Blue Channel: GPIO15-18, GPIO21 (BLUE1-5)
- Control: GPIO41 (VSYNC), GPIO42 (PCLK), GPIO45 (DE), GPIO47 (HSYNC)
- Backlight: GPIO46
Other Interfaces
- I2C: GPIO08 (SDA), GPIO48 (SCL)
- Touch: GPIO01 (INT)
- SD Card: GPIO38 (DO), GPIO39 (CLK), GPIO40 (CMD)
- Boot: GPIO00
GPIO Pin Reference
| GPIO Pin | Function |
|---|---|
| System | |
GPIO00 | BOOT |
| Display | |
GPIO02 | LCD_RED1 |
GPIO03 | LCD_RED2 |
GPIO05 | LCD_RED3 |
GPIO06 | LCD_RED4 |
GPIO07 | LCD_RED5 |
GPIO09 | LCD_GREEN0 |
GPIO10 | LCD_GREEN1 |
GPIO11 | LCD_GREEN2 |
GPIO12 | LCD_GREEN3 |
GPIO13 | LCD_GREEN4 |
GPIO14 | LCD_GREEN5 |
GPIO15 | LCD_BLUE1 |
GPIO16 | LCD_BLUE2 |
GPIO17 | LCD_BLUE3 |
GPIO18 | LCD_BLUE4 |
GPIO21 | LCD_BLUE5 |
GPIO41 | VSYNC |
GPIO42 | PCLK |
GPIO45 | DE |
GPIO46 | LCD Backlight |
GPIO47 | HSYNC |
| Touchscreen | |
GPIO01 | TP_INT |
| I2C | |
GPIO08 | I2C_SDA |
GPIO48 | I2C_SCL |
| Storage | |
GPIO38 | SD_DO |
GPIO39 | SD_CLK |
GPIO40 | SD_CMD |
Sample YAML configuration
#-------------------------------------------
substitutions:
name: lilygo-t-rgb-2-1
friendly_name: Lilygo T-RGB 2.1in
esphome:
name: "${name}"
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
CONFIG_SPIRAM_RODATA: y
logger:
psram:
mode: octal
speed: 80MHz
i2c:
- id: tp_i2c
sda: 8
scl: 48
scan: true
frequency: 400kHz
xl9535:
id: expander
power_supply:
- id: pwr_en
pin:
xl9535: expander
number: 2
enable_on_boot: true
- id: lcd_bl
pin:
number: 46
enable_on_boot: true
touchscreen:
- platform: cst816
id: my_touchscreen
reset_pin:
xl9535: expander
number: 1
update_interval: 16ms
skip_probe: true
interrupt_pin: 1
on_touch:
- lambda: |-
ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
touch.x,
touch.y,
touch.x_raw,
touch.y_raw
);
spi:
- id: lcd_spi
clk_pin:
xl9535: expander
number: 5
mosi_pin:
xl9535: expander
number: 4
interface: software
display:
- platform: st7701s
id: st7701s_disp
update_interval: never
auto_clear_enabled: false
data_rate: 75kHz
spi_mode: MODE3
color_order: BGR
invert_colors: true
dimensions:
width: 480
height: 480
transform:
mirror_x: false
mirror_y: false
cs_pin:
xl9535: expander
number: 3
de_pin: GPIO45
hsync_pin: GPIO47
vsync_pin: GPIO41
pclk_pin: GPIO42
pclk_frequency: 12MHz
pclk_inverted: false
#
data_pins:
red:
- GPIO2 #r1
- GPIO3 #r2
- GPIO5 #r3
- GPIO6 #r4
- GPIO7 #r5
green:
- GPIO9 #g0
- GPIO10 #g1
- GPIO11 #g2
- GPIO12 #g3
- GPIO13 #g4
- GPIO14 #g5
blue:
- GPIO15 #b1
- GPIO16 #b2
- GPIO17 #b3
- GPIO18 #b4
- GPIO21 #b5`
lvgl: