Hello, I’m trying to start using LilyGo T-RGB-2.1 v1.2 display with ESPHOME but with my current config is not working and I was wondering if someone else managed to make it work.
The config I got so far by searching esphome github & lilygo github related to pins is below:
esphome:
name: office-display
friendly_name: office-display
on_boot:
priority: 800
then:
- switch.turn_off: lcd_reset
- delay:
50ms
- switch.turn_on: lcd_reset
- switch.turn_on: lcd_enable
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
flash_size: 16MB
cpu_frequency: 240MHz
psram:
mode: octal
speed: 80MHz
# Enable logging
logger:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
i2c:
sda: 8
scl: 48
xl9535:
- id: xl9535_hub
address: 0x20
spi:
clk_pin:
xl9535: xl9535_hub
number: 5
mosi_pin:
xl9535: xl9535_hub
number: 4
display:
- platform: mipi_rgb
model: T-RGB-2.1
id: lcd
lambda: |-
it.fill(Color::WHITE);
it.printf(20, 20, id(font1), Color::BLACK, "T-RGB boot OK");
font:
- file: "gfonts://Roboto"
id: font1
size: 20
# ------------ Backlight ------------
output:
- platform: ledc
pin: 46
id: lcd_backlight
frequency: 20000 Hz
light:
- platform: monochromatic
id: backlight
output: lcd_backlight
name: "LCD Backlight"
restore_mode: ALWAYS_ON
touchscreen:
platform: cst816
id: touchpanel
interrupt_pin: 1
reset_pin:
xl9535: xl9535_hub
number: 1
mode:
output: true
switch:
- platform: gpio
pin:
xl9535: xl9535_hub
number: 6
mode:
output: true
inverted: true
id: lcd_reset
name: "LCD RESET"
- platform: gpio
pin:
xl9535: xl9535_hub
number: 2
mode:
output: true
id: lcd_enable
inverted: true
name: "LCD ENABLE"