Hello everyone. I am somewhat new to the world of microcontrollers, so please filter the context of my post with that knowledge. I recently purchased a skyloong gk104 pro which comes with a silly little display module. The module is an ESP32-s3 with a enh-tv0200b013 display. the display has the following characteristics:
LCD Size: 2.4" TFT
Display Resolution: 240(RGB) *320
OPERATING TEMP: -20°C~+70°C
STORAGE TEMP: -30°c~+80°c
View Direction: 12 o’clock
LCD IC: ST7789V
I could not find a datasheet for this exact display.
I would like to flash esphome on this with the end goal of being able to display the status of sensors with Home Assistant. I fed the parts into chatGPT and got a starting point on the yaml config, but am unsure where to go from there. ChatGPT output yaml pasted below, as well as photos of the board in question. I would like to know what my next steps are, and if there are any pitfalls i need to be aware of. I’d prefer to not let the magic smoke out of my brand new module at least if avoidible due to ignorance
esphome:
name: esp32_s3_display
platform: ESP32
board: esp32-s3-devkitc-1 # adjust to your specific ESP32-S3 board if necessary
wifi:
ssid: "your_wifi_ssid"
password: "your_wifi_password"
logger:
api:
ota:
# Enable the SPI bus for the TFT display
spi:
clk_pin: GPIO18 # Set to your actual CLK pin
mosi_pin: GPIO23 # Set to your actual MOSI pin
id: bus_a
# Setup the display
display:
- platform: st7789v
model: "TFT 2.4" # Set the display model
cs_pin: GPIO5 # Set to your CS pin (chip select)
dc_pin: GPIO21 # Set to your DC pin (data/command)
reset_pin: GPIO22 # Set to your reset pin
rotation: 0 # Set rotation (0 is default, change if needed)
update_interval: 60s
id: my_display
# Optional: you can add more sensors, switches, etc. below
anything contained in the yaml on my post may be a chatgpt hallucination. I wrote not one character of that code block. I fed the LLM the part numbers, this is what it spat out
That’s what I expected.
You are having hard time with your setup if you don’t find the display pins either through your inspection or from some documentation.
Thats the hint i needed to move forward. I am new to this all ty. Im guessing a place to start could be tracing from the esp32 to the display connector and identifying the proper pins?
@nickrout thanks for the suggestion. I emailed and asked, maybe they will cough up the info
correct me if i am wrong, but from this pinout diagram and what i see on the board pic above, it looks like the display is using GPIO06-GPIO11. An important question I should ask is can i smoke this board by trying incorrect values? or is it recoverable? if the latter, I will gladly ask less questions and try more things. I am not here because I want my hand held, I want to figure this out. Just without bricking my little module
managed to trace the pins that are directly connected from the display to the esp32. The display pin numbers are provided from clear printing on the other side of the display ribbon cable, identifying 1 side as pin 1 and the other as 12.
requests for datasheets have gone unanswered thus far but I have not given up hope.
My current (non display working) configuration based off my best guesswork, reading, and a little bit of experience now with my little clock…
esphome:
name: esphome-web-464ba4
friendly_name: ESPHome Web 464ba4
min_version: 2024.11.0
name_add_mac_suffix: false
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
spi:
clk_pin: GPIO09 # Set to your actual CLK pin
mosi_pin: GPIO10 # Set to your actual MOSI pin
id: bus_a
# Allow Over-The-Air updates
ota:
platform: esphome
wifi:
ssid: "wifinetwork"
password: "wifipassword"
ap:
ssid: "skyloong"
password: "wifipassword"
# Define a PWM output on the ESP32 for the backlight control
output:
- platform: ledc
pin: GPIO11 # Pin for backlight control (you've assigned GPIO11 for this)
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 # The backlight will always be on after a reboot
# Display configuration using the ST7789V controller
display:
- platform: ili9xxx
model: st7789v
dc_pin: GPIO07
reset_pin: GPIO08
invert_colors: false
show_test_card: true
One step forward. At least you got confirmation how reliable CGPT’s unlimited fantasy is…
Any documentation would help, those are all just general Gpios and quite challenging guesswork with 6 of them.
so my tracing was apparently wrong, backlight is apparently on GPIO14. I figured that out in the most caveman like way possible. iterating one by one until i found the pin…
another few bits from an extremely amateur ghidra analysis of the original firmware, im guessing invert colors should be true as I see the string ds “esp_lcd_panel_invert_color(panel_handle, true)”, i am not sure if the string “esp_lcd_panel_swap_xy(panel_handle, true)” means I need to rotate 180 or not.