WT32-SC01 with esphome

I vote for this also. I have one of these, and it’s a nice single-board esp32 and display.
Works very nice with the recommended software, but it would be awesome to incorporate it with ESP-Home and Home Assistant.

1 Like

Any updates on this? Trying to decide between the WT32-SC01 and an M5Stack Core2

Highly unlikely you can use a screen and a BT proxy
Not enough memory, tried a few esp32s and ili9341 and no go.
The wt32-sc01 does not have a native integration in esphome either, some “guy” wrote some code for it and put it behind a pay wall, super community friendly

Are you able to share the link to that please?
Not that I intent to purchase it, but curious to know what they’ve done.

I did find this, but haven’t tried it yet: jhogendorn/esphome-wt32-sc01-display: A custom esphome component to support the wt32-sc01 display (github.com)

1 Like

Disregard, found the link.

I did however find this: 3.5" 320x480 WT32-SC01 | OXRS Docs

They use the ESP web flasher to deploy it, so there’s hope. Unfortunately the site doesn’t seem to explain how to install their main system, so I’m going to see if I can pick it apart.

1 Like

The WT32-SC01 device is now supported with the ILI9xxx driver in the 2023.3.1 ESPHome build

1 Like

Awesome!
What “model:” should we use to define it on the YAML?
Is there any documentation or examples to get started?

1 Like

this works for me. have not played with touch yet.

esp32:
board: esp-wrover-kit
framework:
type: arduino
output:

  • platform: gpio
    pin: GPIO23
    id: Backlight

Which pins are you using to interface the display? In ESPHome there is information about using cs/dc/reset pins, but the panel seems to be using a whole set of other data pins from the documentation.
Trying to map this…

reset_pin -> LCD_RESET = GPIO4
cs_pin -> LCD_RS (Command/Data selection) = GPIO0
dc_pin -> LCDWR (Write clock) = GPIO47
?? -> LCD_TE (Frame sync) = GPIO48

MOSI/CLK pins?

Could someone be kind to post the full YAML configuration?

not giving full YAML, but here are the important parts that should get you going…

esp32:
  board: esp-wrover-kit
  framework:
    type: arduino
output:
  - platform: gpio
    pin: GPIO23
    id: tst_Backlight
light:
  - platform: binary
    name: "wt32 Back Light"
    output: tst_Backlight    
    id: backlight
    restore_mode: ALWAYS_ON
spi:
  clk_pin: GPIO14
  mosi_pin: GPIO13
  miso_pin: GPIO12
display:
  - platform: ili9xxx
    model: ST7796
    cs_pin: GPIO15
    dc_pin: GPIO21
    reset_pin: GPIO22
    rotation: 270

hth

2 Likes

Awesome, thanks!
Will give it a shot.

That worked a treat, thank you!
Here’s my with code to at least display some text.
Next step is to start playing with touch.

substitutions:
  name: "wt32-sc01"
  friendly_name: "WT32-SC01"
  id_prefix: "wt32_sc01"

esphome:
  name: ${name}
esp32:
  board: esp-wrover-kit
  framework:
    type: arduino

packages:
  device_base: !include includes/common_settings.yaml

#esp32_ble_tracker:

#bluetooth_proxy:
#    active: true

time:
  - platform: homeassistant
    id: homeassistant_time

output:
  - platform: gpio
    pin: GPIO23
    id: tst_Backlight

light:
  - platform: binary
    name: "${friendly_name} Back Light"
    output: tst_Backlight    
    id: ${id_prefix}_backlight
    restore_mode: ALWAYS_ON

spi:
  clk_pin: GPIO14
  mosi_pin: GPIO13
  miso_pin: GPIO12

display:
  - platform: ili9xxx
    id: ${id_prefix}_display
    model: ST7796
    cs_pin: GPIO15
    dc_pin: GPIO21
    reset_pin: GPIO22
    rotation: 270
    pages:
      - id: page1
        lambda: |-
          it.printf(64,0, id(my_font), TextAlign::TOP_CENTER, "WT32-SC01");
          it.strftime(64, 40, id(my_font), TextAlign::BASELINE_CENTER, "%I:%M:%S %p", id(homeassistant_time).now());
          it.printf(64, 60, id(my_font), TextAlign::BOTTOM_CENTER, "Time");
      - id: page2
        lambda: |-
          it.printf(64,0, id(my_font), TextAlign::TOP_CENTER, "WT32-SC01");
          it.printf(64, 40, id(my_font), TextAlign::BASELINE_CENTER, "Hello Loryan!");
          it.printf(64, 60, id(my_font), TextAlign::BOTTOM_CENTER, "Hi from down here");

font:
  - file:
      type: gfonts
      family: "Open Sans"
    id: my_font
    size: 20

color:
  - id: my_red
    red: 100%
    green: 3%
    blue: 5%
  - id: my_white
    red: 100%
    green: 100%
    blue: 100%

interval:
  - interval: 5s
    then:
      - display.page.show_next: wt32_sc01_display
      - component.update: wt32_sc01_display
1 Like

@DeLorean,
I’ve same board and no problems to manage text and image on the display,
but no success with the touchscreen…
I’ve tried different configuration, related FT6236, without any good results…

Do you have some news, or some suggestion, to enable the touchscreen function on WT32-SC01 ???

Thanks in advance for any help !

I’ve struggled a bit with getting an image on screen. I was able to get it on, but not an animated GIF.
I haven’t been able to get the touch going natively with ESPHome unfortunately, unless I used openHASP - but then that just introduced considerably more stuff I had to learn and make work. :frowning:

Same experience, jerky anigif and touch going nowhere !

I also migrated to openHasp, it’s definitely easier and more effective,
but I have problems with the openHasp integration in HACS under HA.

Sometime it’s not loaded, I’m working on it.

1 Like

Hi,

I’m brand new to esphome and wt32-sc01

  1. thanks for having shared your informations, I’ve ended to get a first successful deployment in a few minutes.

  2. regarding touchescreen, I found two informations, that may help:

Touch (FT6336U)
    TOUCH_SDA=18
    TOUCH_SCL=19
    I2C_TOUCH_ADDRESS=0x38

so not tested so far, but this could be a good starting point:

external_components:
  - source: github://gpambrozio/esphome@FT6336U-touch
    components: [ ft63x6 ]

i2c:
  id: i2c_bus_intern
  sda: 18
  scl: 19
  scan: false

touchscreen:
  - platform: ft63x6
    id: ${id_prefix}_touch
    i2c_id: i2c_bus_intern
    on_touch:
      - logger.log:
          format: Touch at (%d, %d)
          args: [touch.x, touch.y]

1 Like

UPDATE: finally compiled, tested and it looks not bad

when I touch the screen, I get activity:

image

2 Likes

Very interesting, I’ll give it a try as soon as I have time !

Now I using the WT32 with OpenHasp and it works fine.

Thanks for the useful information!

1 Like

Nice work!
The question is… is it worth the effort for soooooooooooo much customisation work to be done in order to get touch points and layouts exactly right… or is it a more effective use of time to get an Android tablet and load Fully Kiosk Browser on it?

For me, I went with the latter as I’ve spend waaaaaay too many hours with both ESPHome and openHASP to try to get the tiny little $40 unit to work with even basic functionality.

1 Like

Actually, that is super helpful, thank you!
I’ve been able to replicate that, because following on from my previous comment - when I removed the Amazon Echo Dot with clock from our bedroom the other day we were left without a clock.
Given the WT32-SC01 was no longer being used, I quickly repurposed it as a basic clock display - but with A LOT more control over format, lighting levels at night, and also to show the currently playing track on the speaker it’s sitting on top of.

Thanks to you figuring out the touch screen, I’ll now be able to put a skip button on there.
Will share the code once I’ve got it going.