esphome config for T-Dongle S3 (with LCD)

Config for LILYGO T-Dongle-S3 (with LCD) with working control for backlight and RGB LED. Note: The FastLED component needs to be updated for the RGB LED to work (tested with 3.5.0). Remove it to build on stock esphome.

esphome:
  name: t-dongle-lcd-example
  platformio_options:
    board_build.flash_mode: dio
  on_boot:
    priority: 600.0
    then:
      - light.turn_on: lcd_backlight

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "<CHANGEME>"

ota:
  password: "<CHANGEME>"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password


output:
  - platform: ledc
    id: output_38
    pin: 38
    inverted: True

text_sensor:
  - platform: wifi_info
    ip_address:
      name: ESP IP Address
    ssid:
      name: ESP Connected SSID
      id: ssid

light:
  - platform: fastled_spi
    chipset: APA102
    data_pin: GPIO40
    clock_pin: GPIO39
    num_leds: 1
    rgb_order: BGR
    name: "FastLED SPI Light"
  - platform: monochromatic
    output: output_38
    name: "LCD Backlight"
    id: lcd_backlight

font:
  - file: "gfonts://Open+Sans@700"
    id: font_roboto
    size: 24

spi:
  clk_pin: 5
  mosi_pin: 3

display:
  - platform: st7735
    model: "INITR_MINI160X80"
    reset_pin: 1
    cs_pin: 4
    dc_pin: 2
    rotation: 270
    device_width: 82
    device_height: 161
    col_start: 0
    row_start: 0
    eight_bit_color: true
    update_interval: 5s
    invert_colors: True
    use_bgr: True
    lambda: |-

      it.fill(Color::BLACK);
      auto red = Color(255, 0, 0);
      auto green = Color(0, 255, 0);
      auto blue = Color(0, 0, 255);
      auto white = Color(255, 255, 255);
      it.print(0,  0, id(font_roboto), red, TextAlign::TOP_LEFT, "red");
      it.print(0,  80, id(font_roboto), green, TextAlign::BOTTOM_LEFT, "green");
      it.print(160,  0, id(font_roboto), blue, TextAlign::TOP_RIGHT, "blue");
      it.print(160,  80, id(font_roboto), white, TextAlign::BOTTOM_RIGHT, "white");
      //it.print(160,  80, id(font_roboto), blue, TextAlign::BOTTOM_RIGHT, id(ssid).state.c_str());

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *