Refactor backlight control and update display configuration in Cat Medication Tracker
This commit is contained in:
@@ -12,13 +12,12 @@ esphome:
|
||||
on_boot:
|
||||
priority: 100
|
||||
then:
|
||||
# Force backlight on after a short delay so we can confirm it is wired correctly.
|
||||
- light.turn_off: backlight
|
||||
- delay: 300ms
|
||||
- light.turn_on: backlight
|
||||
- delay: 500ms
|
||||
- delay: 300ms
|
||||
- component.update: my_display
|
||||
|
||||
psram:
|
||||
# Enable external RAM for large TFT framebuffer usage if available.
|
||||
# With no PSRAM module present, this is a no-op.
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
@@ -69,6 +68,8 @@ spi:
|
||||
clk_pin: GPIO14
|
||||
mosi_pin: GPIO13
|
||||
miso_pin: GPIO12
|
||||
# Set bus rate here to ensure the TFT doesn't run too fast at startup.
|
||||
frequency: 20MHz
|
||||
|
||||
# ILI9488 Display (3.5" 320x480, portrait)
|
||||
display:
|
||||
@@ -79,9 +80,8 @@ display:
|
||||
dc_pin: GPIO2
|
||||
reset_pin: GPIO4
|
||||
rotation: 0
|
||||
invert_colors: false
|
||||
invert_colors: true
|
||||
color_order: bgr
|
||||
data_rate: 20MHz
|
||||
dimensions:
|
||||
width: 320
|
||||
height: 480
|
||||
@@ -223,7 +223,7 @@ output:
|
||||
- platform: gpio
|
||||
pin: GPIO21
|
||||
id: backlight_pwm
|
||||
inverted: true
|
||||
inverted: false
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
|
||||
Reference in New Issue
Block a user