I have ili9488 display without touch, esp32-s3. Screen powered by 5V, signal lines via 3.3V. The image is displayed well, the colors are also well reproduced. However, after a second there are jumps, colors diverge, the content jumps, the image is illegible, stops. You can see it in the foto.
Connection diagram for ESP.
Cs-10; dc-7; rst-4; LED-13; mosi-11; sclk-12; with miso connected and as without, no improvement.
Program written on esphome, I want to use it for Home Assistant.
The most interesting thing is that when I hold the mass of the system with my finger, the screen works and no other errors pop up on logs.
Code:
esphome:
name: esp32-s3-lcd
friendly_name: esp32-s3-lcd
# platformio_options:
#board_build.psram: true
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Example configuration entry
psram:
mode: quad
speed: 80MHz
# Enable logging
logger:
logs:
component: ERROR
# Enable Home Assistant API
api:
encryption:
key: "IYNl+zcOfH1/cf5SbWwyBjAO2BMguYtIISgmI3K7Wq4="
ota:
- platform: esphome
password: "f91ab4cda59e8753c7f0644ce1c3cb63"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-S3-Lcd Fallback Hotspot"
password: "okDaEXJHF6H3"
time:
- platform: homeassistant
id: esptime
binary_sensor:
- platform: gpio
pin:
number: 14
inverted: true
mode:
input: True
pullup: False
device_class: power
name: czujnik_hdd
sensor:
- platform: homeassistant
id: Temp_u_Seby
entity_id: sensor.atc_temperaturesebo
internal: true
- platform: homeassistant
id: Wilg_u_Seby
entity_id: sensor.atc_humiditysebo
internal: true
- platform: homeassistant
id: MOC_u_Seby
entity_id: sensor.roznicowa_phase_a_power
internal: true
- platform: homeassistant
id: Gniazdo
entity_id: switch.gniazdo_pc_1
internal: true
- platform: homeassistant
id: HDD
entity_id: sensor.czujnik_hdd
internal: true
# Define a PWM output on the ESP32
output:
- platform: ledc
pin: GPIO13
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
spi:
clk_pin: GPIO12
mosi_pin: GPIO11
miso_pin: GPIO9 # Niektóre modele mogą wymagać MISO, choć często jest nieużywane
display:
- platform: ili9xxx
model: ILI9488
dc_pin: GPIO07
reset_pin: GPIO4
update_interval: 500ms # Aktualizuj co 2 sekundy
data_rate: 20MHz
invert_colors: false
show_test_card: false
rotation: 90
dimensions:
height: 480
width: 320
id: my_display
pages:
- id: page1
lambda: |-
it.fill(Color(0, 50, 100));
it.strftime(100, 80, id(font3), id(my_white), "%H:%M:%S", id(esptime).now());
it.strftime(40, 180, id(font3), id(my_white), "%d-%m-%Y", id(esptime).now());
- id: page2
lambda: |-
it.fill(Color(0, 0, 150));
// Print time in HH:MM format
it.strftime(0, 0, id(font3), "%H:%M:%S %d-%m-%Y", id(esptime).now());
it.print(0, 60, id(font1), id(my_white), "Temperatura tutaj:"); if (id(Temp_u_Seby).has_state()) { it.printf(180, 60, id(font1), "%.1f C", id(Temp_u_Seby).state); }
it.print(0, 80, id(font1), id(my_white), "Wilgotnosc tutaj:"); if (id(Wilg_u_Seby).has_state()) { it.printf(180, 80, id(font1), id(my_white), "%.1f %", id(Wilg_u_Seby).state); }
it.print(0,100, id(font1), id(my_white), "Jest dzis:"); it.strftime(100,100, id(font1), "%A a miesiac: %B", id(esptime).now());
if (id(Gniazdo).has_state()) { it.filled_circle(440, 180, 30, Color(0, 255, 0));} // kolor zielony
if (id(HDD).has_state()) {it.filled_circle(440, 260, 30, Color(255, 0, 0));} // kolor czerwony
it.print(0, 120, id(font1), id(my_white), "Zuzyta Moc tutaj:"); if (id(MOC_u_Seby).has_state()){it.printf(180,120,id(font1), id(my_white), "%.1f W", id(MOC_u_Seby).state);} // moc seba
#it.print(100, 200, id(font1), id(my_white), "LCD u Seby");
color:
- id: my_red
red: 100%
green: 3%
blue: 5%
- id: my_green
red: 0%
green: 100%
blue: 5%
- id: my_blue
red: 0%
green: 3%
blue: 100%
- id: my_white
red: 100%
green: 100%
blue: 100%
font:
- file: "fonts/Roboto-Regular.ttf"
id: font1
size: 20
- file: "fonts/Roboto-Regular.ttf"
id: font2
size: 30
- file: "fonts/fontseba.ttf"
id: font3
size: 80
captive_portal: