Skip to content

LilyGo T-Display-S3 170x320 Running esphome using patched TFT-eSPI library

Notifications You must be signed in to change notification settings

levvvy/lilygo-tdisplays3-esphome

 
 

Repository files navigation

LILYGO® T-Display-S3 ST7789 ESPHome

This repository provides an ESPHome configuration for the LILYGO® T-Display-S3 ESP32-S3 board using patched TFT_eSPI.

Video

liligo-video.mp4

Pin schema

Installation

You will first need to do a manual installation by putting the example.yaml file into your esphome folder then using the modern format in ESPHome to get a local copy of the firmware and finally use https://web.esphome.io/ to install over USB.

⚠ Click to expand/collapse the code block ⚠
esphome:
  name: s3

external_components:
  - source: github://landonr/lilygo-tdisplays3-esphome
    components: [tdisplays3]

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

# Enable Home Assistant API
api:

ota:
  password: "6ada29f6f41ce1685d29d406efd25fa4"

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

time:
  - platform: homeassistant
    id: ha_time

switch:
  - platform: gpio
    pin: GPIO38
    name: "Backlight"
    id: backlight
    internal: true
    restore_mode: RESTORE_DEFAULT_ON

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 30

display:
  - platform: tdisplays3
    id: disp
    update_interval: 1s
    rotation: 270
    lambda: |-
      it.printf(20, 70, id(roboto), Color(255, 0, 0), id(ha_time).now().strftime("%Y-%m-%d %H:%M:%S").c_str());
</details>

Method

Follow these steps to set up and flash the firmware on your LILYGO® TTGO T-Display-S3 board:

  1. Download a copy of this repository and place the tdisplays3 folder in your ESPHome folder. Also, place the example.yaml and secrets.yaml files into the ESPHome folder, making sure to change the example.yaml API and secrets.yaml details to your own credentials.
  2. From your ESPHome dashboard, create a local copy of the S3 firmware by clicking the three dots > Install > Manual Download > Modern Format.
  3. To set the board into flash mode, hold the button on the left of the USB port while plugging in the USB cable that is connected to your desktop machine.
  4. Navigate to https://web.esphome.io/ in a compatible browser (Chrome, Edge, etc.) and click Connect. Select the corresponding COM Port and click Connect again.
  5. When the board has connected, click Install and select the firmware that you have created. This will erase the board and write the new firmware.
  6. When the firmware has been written to the board, you will need to unplug and reconnect the USB cable.
  7. After that, you can upload firmware updates using Wi-Fi without repeating this process.

Table of Contents

  1. Features
  2. Prerequisites
  3. Installation
  4. Configuration
  5. Usage

Features

  • 🖥️ 1.54-inch TFT display with 170x320 resolution
  • 🌐 Wi-Fi connectivity using ESP32-S3
  • 🔄 Over-The-Air (OTA) updates
  • 🕒 Real-Time Clock (RTC) support
  • 🔋 Battery level monitoring

Prerequisites

Before you begin, make sure you have the following installed on your system:

  1. Python 3.7 or higher
  2. ESPHome (version 1.20.0 or higher)
  3. PlatformIO (for advanced users)