-
Notifications
You must be signed in to change notification settings - Fork 1
/
guition-320x480-jc3248w535-native-qspi_dbi.yaml
151 lines (135 loc) · 3.14 KB
/
guition-320x480-jc3248w535-native-qspi_dbi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
esphome:
name: jc3248w535
friendly_name: Guition 320x480 JC3248W535 Native
platformio_options:
upload_speed: 921600
board_build.flash_mode: dio
board_build.f_flash: 80000000L
board_build.f_cpu: 240000000L
esp32:
board: esp32-s3-devkitc-1
flash_size: 16MB
framework:
type: esp-idf
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
CONFIG_SPIRAM_RODATA: y
psram:
mode: octal
speed: 80MHz # 120mhz is not supported and falls back to 40mhz
# Enable logging
logger:
baud_rate: 921600
api:
encryption:
key: "szctjULZfg2L9pzhsOQxP49CGKL1qAPajjkEbdbMHy8="
ota:
- platform: esphome
password: "a07ce4750cc57b5360162ba12f209d3f"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
spi:
id: display_qspi
type: quad
clk_pin: 47
data_pins: [21, 48, 40, 39]
i2c:
sda: 4
scl: 8
id: touchscreen_bus
display:
- platform: qspi_dbi
model: axs15231
data_rate: 40MHz
id: my_display
spi_id: display_qspi
dimensions:
height: 480
width: 320
cs_pin: 45
rotation: 0 # 90 for landscape, 0 for portrait
#update_interval: never
auto_clear_enabled: false
#show_test_card: true # must enable update_interval, auto_clear_enable
output:
- platform: ledc
pin: GPIO1
id: backlight
light:
- platform: monochromatic
output: backlight
name: "backlight Light"
restore_mode: ALWAYS_ON
touchscreen:
- platform: axs15231
id: my_touch
display: my_display
i2c_id: touchscreen_bus
transform:
swap_xy: 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
);
lvgl:
#full_refresh: true # not needed any longer
draw_rounding: 8 # necessary for the axs15231 display controller
displays: my_display
touchscreens: my_touch
bg_color: 0
border_width: 0
outline_width: 0
theme:
bar:
radius: 0
indicator:
radius: 0
arc_color: red
pages:
- id: main_page
widgets:
- label:
align: TOP_MID
y: 2 # distance down from top
text: 'Battery Power kW'
- bar:
align: TOP_MID
x: 0
y: 20 # distance down from top
id: bar_power
indicator:
arc_color: green
radius: 0
mode: symmetrical
arc_color: blue
value: 25
width: 320
height: 20
min_value: -50
max_value: 100
- label:
align: TOP_MID
y: 50 # distance down from top
text: 'Battery Volts'
- spinner:
align: TOP_MID
x: 0
y: 200
spin_time: 5s
arc_length: 20deg
arc_color: 0x00ff00
id: spinner_id
indicator:
arc_color: 0xff0000
#interval:
# - interval: 1s
# then:
# - lvgl.widget.redraw: