Finally got Waveshare Waveshare ESP32-S3 Development Board 1.28inch LCD working

I bought this development board a while ago as my first esphome project. It took quite a while to find the right settings, pins etc to even just got the LCD screen to work so I thought I would share the working config here.

Some of the code are extracts from other threads here, so apologies if someone recognizes their work.

# Notes - feel free to remove
# - it is a single core processor running at up to 160Mhz, 400KB SRAM, 348KB ROM, 4MB flash
# - display resolution is 240*240 IPS
# - battery connector is a JST 1.25 2P. Note that this is for a 3V lithium battery (3.3V would be fine. It does have
#    over current protection but even so I would avoid 3.7V or greater just in case). 
# - It has bluetooth, and can function as a ble tracker but memory and processor constraints means that it can
#    have issues (eg random rebooting) doing that AND running the display at the same time
# - processor is weak and memory low, so do not expect it to be able to handle animation too well 
# - specs say power consumption is 100mA - but varies depending on load and if display is active
# - screen is 240 pixels wide, so radius is 120 pixels, circumference 754 pixels
#   a square would have sides 170 pixels to just fit - maybe 169 to be safe
#   adjust images to suit. Keep in mind that images will eat away the limited memory on the device.


substitutions:
  devicename: round-touchscreen
  friendname: Round Touchscreen esp32
# Change the timezone to suit your location, or even just remove it - it will likely be picked up automatically
  timez: Europe/Vienna
  board: esp32-s3-devkitc-1
# Display state on initial start
# Note that the screensaver only starts after the first touch of the display
# Change to ALWAYS_OFF if want the screen to be off after booting, ALWAYS_ON if want it on at start eg for initial troubleshooting
  screenstart: ALWAYS_ON
# Timeout for the screen
  screensaver: 5 min
#GPIO pins for the LCD screen
  repin: GPIO14
  dcpin: GPIO8
# Note - you may see an error on compilation "WARNING GPIO2 is a Strapping PIN and should be avoided" - ignore this as you have no choice
# This error message may be removed via the "ignore_strapping_warning" option for the screen driver
  bkpin: GPIO2 # was 2 two
  clpin: GPIO10
  mopin: GPIO11
  mipin: GPIO12
  cspin: GPIO09
# GPIO pins for the touch screen
  sdapin: GPIO6
  sclpin: GPIO7
  intpin: GPIO5  
  rstpin: GPIO13


esphome:
  name: $devicename
  friendly_name: $friendname

esp32:
  board: $board
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: key

ota:
  - platform: esphome
    password: password

wifi:
  ssid: ssid
  password: password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Round-Touchscreen"
    password: password

captive_portal:


spi:
  mosi_pin: $mopin
  clk_pin: $clpin
  miso_pin: $mipin
# Don't use software - makes it crawl  
#  force_sw: True
#mosi = Master Out Slave In
#miso = Master In Slave Out or fermented bean paste. In this case, most likely the former rather than the latter. Doesn't matter as not used.

i2c:
  sda: $sdapin
  scl: $sclpin
  #Following helped someone get rid of the "Components should block" error messages but didn't for me
  #frequency: 400kHz

# Define a PWM output on the ESP32
output:
  - platform: ledc
    pin: $bkpin
    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

# Optional: Add a simple display test
text_sensor:
  - platform: wifi_info
    ip_address:
      name: "IP Address"

display:
  - platform: ili9xxx
    model: GC9A01A #ST7789V
    dc_pin: $dcpin
    reset_pin: $repin
    cs_pin: $cspin
    invert_colors: true
    show_test_card: true
    dimensions: 
      height: 240
      width: 240
    rotation: 0
    color_order: BGR
3 Likes

You Sir, are a scholar and a gentleman

These are cool displays. I have tried several and they look great, but the screen refresh rate sucks and the periodic full screen redraws are a show stopper. It’s too bad. When they’re working they do look good.