Hi
I have problem to get my screen working on this. I have tried alot of diffrent configs.
Its a esp32-2432s028 with dual usb (micro/usb-c).
Anu suggestions?
Hi
I have problem to get my screen working on this. I have tried alot of diffrent configs.
Its a esp32-2432s028 with dual usb (micro/usb-c).
Anu suggestions?
Looks like a sunton-esp32-2432s028R with a resistive touch screen. Resistive touch doesn’t work that well but this file should get you going.
Or openhasp
Thanks I will try this code and check on yours
Hi everyone thanks for all help. I manage to get it working I just had to add “color_palette: 8BIT” under display section.
Interesting. I have one of these screens and I did not need to add that to get it working.
Can you post your final working configuration?
Yes I just made alot of testing diffrent examples
display:
- platform: ili9xxx
# model: tft 2.4
model: ili9342
color_palette: 8BIT
spi_id: tft
cs_pin: GPIO15
dc_pin: GPIO2
rotation: 0
invert_colors: true
id: cyd
Does this work? That is what works for me
display:
- id: my_display
platform: ili9xxx
model: ILI9341
spi_id: tft
cs_pin:
number: 15
ignore_strapping_warning: true
dc_pin:
number: 2
ignore_strapping_warning: true
invert_colors: false
update_interval: never
auto_clear_enabled: false
I will try that
You’ll want to add:
lvgl:
buffer_size: 25%
It’s not likely to work with the native display lambda functions.
Righ I have that in my config
# sunton-esp32-2432s028R
# Hardware configuration file
esphome:
min_version: 2025.2.2
esp32:
board: esp32dev
framework:
type: arduino
lvgl:
buffer_size: 25%
i2c:
- sda: 27
scl: 22
# sensor:
# - platform: adc
# pin: 34
# name: "Brightness"
# update_interval: 60s
#-------------------------------------------
# Backlight
#-------------------------------------------
output:
- platform: ledc
pin: 21
frequency: 1000hz
id: gpio_backlight_pwm
- id: output_red
platform: ledc
pin: 4
inverted: true
- id: output_green
platform: ledc
pin: 16
inverted: true
- id: output_blue
platform: ledc
pin: 17
inverted: true
light:
- platform: monochromatic # Define a monochromatic, dimmable light for the backlight
output: gpio_backlight_pwm
name: Display Backlight
id: display_backlight
restore_mode: ALWAYS_ON
- platform: rgb
id: rgb_led
name: RGB LED
red: output_red
green: output_green
blue: output_blue
restore_mode: ALWAYS_OFF
spi:
- id: tft
clk_pin: 14
mosi_pin: 13
miso_pin:
number: 12
ignore_strapping_warning: true
- id: touch
clk_pin: 25
mosi_pin: 32
miso_pin: 39
touchscreen:
- id: main_touchscreen
platform: xpt2046
spi_id: touch
cs_pin: 33
interrupt_pin: 36
threshold: 400
calibration:
x_min: 280
x_max: 3860
y_min: 340
y_max: 3860
transform:
mirror_x: true
on_touch:
- lambda: |-
ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
touch.x,
touch.y,
touch.x_raw,
touch.y_raw
);
display:
- id: main_display
platform: ili9xxx
model: ILI9341
spi_id: tft
cs_pin:
number: 15
ignore_strapping_warning: true
dc_pin:
number: 2
ignore_strapping_warning: true
invert_colors: false
update_interval: never
auto_clear_enabled: false