Help needed to get this tiny screen working - ESP32-c6 1.47in display

Just to add to this thread my success. This was sitting in a box for a while and I finally this morning tried to get it running. This thread was invaluable, realise being a slight late adopter has its advantages.

I started by creating a device in ESPHome Builder and using a generic ‘esp32-c6-devkitc-1’ as that is now supported natively. After successfully connecting wirelessly, I then added the code from @PsY4 above, the following sections:

esphome:
platformio_options:
→ section entirely

esp32:
→ section entirely

output section for the lcd_backlight control

number:
→ section entirely (realising I can just hard code this)
display:
→ section entirely

Note: in order for the device to work after re-booting or re-applying power it has to be added into home assistant in the devices menu.

Working really well, many thanks all.

2 Likes

There’s been a lot of changes in HA around this area.
I posted code that worked really well from about March until May, and then with June it updated and broke the LCD screen output…
Will repost to confirm when found a working version.

What image did you use for the background.png?

As of esphome 2025.9.1, the following code is what you need to get the screen running.

Curiously it doesn’t go well together with threads so I guess we are stuck with Wi-Fi for now.

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf
spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
  miso_pin: GPIO5
display:
  - platform: st7789v
    model: Waveshare 1.47in 172X320
    dc_pin:
      number: GPIO15
      ignore_strapping_warning: true
    cs_pin: GPIO14
    reset_pin: GPIO21
    backlight_pin: GPIO22
    platform_version: 6.9.0

I am afraid that version is not available anymore.
And the latest is far away from a 6.* :
https://github.com/pioarduino/platform-espressif32/releases/download/54.03.21-2/platform-espressif32.zip)

I can compile and upload my config, but nothing shows up on the screen. Just many “Display update running” in the logs, and a “[W][api.connection:1880]: Home Assistant 2025.4.0 (192.168.1.15): Reading failed CONNECTION_CLOSED errno=128” every 30 seconds.

I think I will put it to a drawer for a couple of months.

1 Like

Does anyone know what this fla means?

“-DBOARD_HAS_PSRAM”

Actually the board doesn’t have PSRAM, right?

Post your yaml and compile log (formatted please).

I thought about borrowing this yaml:

Not done anything with it yet.

I got it working from here ST7789V TFT LCD - ESPHome - Smart Home Made Simple

This is my file that reads the time and displays locally. I couldn’t get the remote
Still very raw with lots of comments

#esp32c6-lcd-147a  Waveshare C6 LCD 1.47in
#
# 260101 : working on display except for time.
# 251231 : config
# https://esphome.io/components/display/st7789v/ see Waveshare 1.47in 172X320
# LCD driver ST7789V3 (LBS147TC-IF15) 172(H)RGB x320(V)
#

substitutions:
  logger_dbg: "DEBUG"


esphome:
  name: esp32c6-lcd-147a
  friendly_name: ESP32C6-LCD-1.47A

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
  miso_pin: GPIO5



# Enable logging
logger:
  level: $logger_dbg
  logs:
    component: ERROR

# Enable Home Assistant API
api:
  reboot_timeout: 0s
  encryption:
    key: "c3lJs2O148U6z6VivWPGDzpHcLsrN3k36Gq5VMz+Lno="

ota:
  - platform: esphome
    password: "b709958b1b0c68620096a78dc60b5cd1"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32C6-Lcd-147A"
    password: "Y1OQtMqYFbu5"

captive_portal:
    
color:
  - id: my_red
    red: 100%
    green: 0%
    blue: 0%
  - id: my_yellow
    red: 100%
    green: 100%
    blue: 0%
  - id: my_green
    red: 0%
    green: 100%
    blue: 0%
  - id: my_blue
    red: 0%
    green: 0%
    blue: 100%
  - id: my_gray
    red: 50%
    green: 50%
    blue: 50%

font:
  - file: "fonts/Helvetica.ttf"
    id: helvetica_48
    size: 48
  - file: "fonts/Helvetica.ttf"
    id: helvetica_24
    size: 24
  - file: "fonts/Helvetica.ttf"
    id: helvetica_12
    size: 12

binary_sensor:
  - platform: status
    name: "Node Status"
    id: system_status
  - platform: gpio
    pin:
      number: GPIO09 
      inverted: true
      mode:
        input: true
        pullup: true
    name: "T-Display Button Input 0"
    id: tdisplay_button_input_0

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: esptime

text_sensor:  #shows on web page
#https://esphome.io/components/text_sensor/uptime.html
  - platform: uptime
    name: "Uptime ddhhmmss"
    #friendly_name: "Uptime ddhhmmss"

################################################################################
# Sensors
################################################################################
sensor:
  # https://esphome.io/components/sensor/uptime.html
  - platform: uptime
    name: UptimeSecs
    id: uptime_secs
    type: seconds
  #  update_interval: 60s
    entity_category: diagnostic

display:
  - platform: st7789v
    model: Waveshare 1.47in 172X320
    dc_pin:
      number: GPIO15
      ignore_strapping_warning: true
    cs_pin: GPIO14
    reset_pin: GPIO21
    backlight_pin: GPIO22
    rotation: 90
    lambda: |-
      it.rectangle(0,  0, it.get_width(), it.get_height(), id(my_blue));
      it.rectangle(0, 20, it.get_width(), it.get_height(), id(my_blue));   // header bar

      it.strftime((240 / 2), (140 / 3) * 1 + 5, id(helvetica_24), id(my_gray), TextAlign::CENTER, "%Y-%m-%d", id(esptime).now());
      it.strftime((240 / 2), (140 / 3) * 2 + 5, id(helvetica_48), id(my_gray), TextAlign::CENTER, "%H:%M:%S", id(esptime).now());
      it.print(5, 5, id(helvetica_12), id(my_yellow), TextAlign::TOP_LEFT, "ESPHome");

      // Comment out the above lines to see the image without text overlaid
      // it.image(0, 0, id(my_image));

      if (id(system_status).state) {
        it.print(235, 5, id(helvetica_12), id(my_green), TextAlign::TOP_RIGHT, "Online");
      }
      else {
        it.print(235, 5, id(helvetica_12), id(my_red), TextAlign::TOP_RIGHT, "Offline");
      }
1 Like

After a week of trying different configs I finally landed on some mentioning that display driver st7789v is obsolete and need to use mipi_spi. After going through waveshare C++ samples was able to generate proper display config

this is just snippet of my config, but display and WiFi work together and I can control brightness of the display

esphome:
  name: ${device_internal_name}
  friendly_name: ${device_friendly_name}
  on_boot:
    then:
      - light.turn_on:
          id: back_light
          brightness: 50%

################################################################################
# ESP32 platform
################################################################################
esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  flash_size: 4MB
  framework:
    type: esp-idf


################################################################################
# SPI
################################################################################
spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
  miso_pin: GPIO5

################################################################################
# DISPLAY
################################################################################
# Define a PWM output on the ESP32
output:
  - platform: ledc
    pin: GPIO22
    id: backlight_pwm

# Define a monochromatic, dimmable light for the backlight
light:
  - platform: monochromatic
    output: backlight_pwm
    name: "Display Backlight"
    id: back_light
    restore_mode: ALWAYS_ON

display:
  - platform: mipi_spi
    model: custom
    dc_pin: GPIO15
    cs_pin: GPIO14
    reset_pin: GPIO21
    color_order: bgr
    color_depth : 16
    pixel_mode: 18bit
    invert_colors: true
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: false
    dimensions:
      width: 320
      height: 172
      offset_height: 34
      offset_width: 0
    init_sequence:
      # LCD_Driver\Vernon_ST7789T\Vernon_ST7789T.c
      - [ 0xb0, 0x00, 0xe8]
      - [ 0xB2,0x0c, 0x0c, 0x00, 0x33, 0x33 ]
      - [ 0xb7, 0x75 ]
      - [ 0xbb, 0x1a ]
      - [ 0xc0, 0x80 ]
      - [ 0xc2, 0x01, 0xff ]
      - [ 0xc3, 0x13 ]
      - [ 0xb4, 0x20 ]
      - [ 0xc6, 0x0f ]
      - [ 0xd0, 0xa4, 0xa1 ]
      - [ 0xE0, 0xD0, 0x0D, 0x14, 0x0D, 0x0D, 0x09, 0x38, 0x44, 0x4E, 0x3A, 0x17, 0x18, 0x2F, 0x30 ]
      - [ 0xE1, 0xD0, 0x09, 0x0F, 0x08, 0x07, 0x14, 0x37, 0x44, 0x4D, 0x38, 0x15, 0x16, 0x2C, 0x2E ]
      - [ 0x21 ]
      - [ 0x29 ]
      - [ 0x2c ]