Optimized wiring to use native serial.
Fixed button styles.
This commit is contained in:
+69
-48
@@ -9,12 +9,14 @@
|
|||||||
# |--- |--- |--- |--- |
|
# |--- |--- |--- |--- |
|
||||||
# |5V |VIN |Pin2/5V |Red |
|
# |5V |VIN |Pin2/5V |Red |
|
||||||
# |GND |GND |Pin6/GND |Blk |
|
# |GND |GND |Pin6/GND |Blk |
|
||||||
# |Display SCLK |GPIO23 |Pin23/GPIO11/SPI0_SCLK |Blue |
|
# |Display SCLK |GPIO18 |Pin23/GPIO11/SPI0_SCLK |Blue |
|
||||||
# |Display MOSI |GPIO22 |Pin19/GPIO10/SPI0_MOSI |Green |
|
# |Display MOSI |GPIO23 |Pin19/GPIO10/SPI0_MOSI |Green |
|
||||||
# |Display CS |GPIO19 |Pin24/GPIO8/SPI0_CE0 |Mgnta |
|
# |Display CS |GPIO19 |Pin24/GPIO8/SPI0_CE0 |Mgnta |
|
||||||
# |Display DC |GPIO18 |Pin22/GPIO25 |White |
|
# |Display DC |GPIO17 |Pin22/GPIO25 |White |
|
||||||
# |Display Busy |GPIO4 |Pin24/GPIO24 |Brown |
|
# |Display Busy |GPIO4 |Pin24/GPIO24 |Brown |
|
||||||
# |Display RST |GPIO5 |Pin11/GPIO17/SPI1_CE1 |Orange |
|
# |Display RST |GPIO5 |Pin11/GPIO17/SPI1_CE1 |Orange |
|
||||||
|
# |Touch SDA |GPIO21 |Pin3/GPIO2/I2C1_SDA |Gray |
|
||||||
|
# |Touch SCL |GPIO22 |Pin5/GPIO3/I2C1_SCL |Purple |
|
||||||
#
|
#
|
||||||
# Exposed Entities
|
# Exposed Entities
|
||||||
# ---
|
# ---
|
||||||
@@ -57,11 +59,14 @@ captive_portal:
|
|||||||
|
|
||||||
# For the display
|
# For the display
|
||||||
spi:
|
spi:
|
||||||
clk_pin: GPIO23
|
clk_pin: GPIO18
|
||||||
mosi_pin: GPIO22
|
mosi_pin: GPIO23
|
||||||
|
|
||||||
# For the touchscreen
|
# For the touchscreen
|
||||||
# ...
|
i2c:
|
||||||
|
sda: GPIO21
|
||||||
|
scl: GPIO22
|
||||||
|
scan: false
|
||||||
|
|
||||||
### Okay, now the Good Stuff ###
|
### Okay, now the Good Stuff ###
|
||||||
|
|
||||||
@@ -80,12 +85,15 @@ font:
|
|||||||
|
|
||||||
# Pull in some icons from the material design library
|
# Pull in some icons from the material design library
|
||||||
image:
|
image:
|
||||||
|
defaults:
|
||||||
|
transparency: chroma_key
|
||||||
|
invert_alpha: false
|
||||||
|
resize: 54x54
|
||||||
|
binary:
|
||||||
- file: "mdi:home-lock-open"
|
- file: "mdi:home-lock-open"
|
||||||
id: home_lock_open
|
id: home_lock_open
|
||||||
type: binary
|
- file: "mdi:home-lock"
|
||||||
transparency: chroma_key
|
id: home_lock
|
||||||
invert_alpha: true
|
|
||||||
resize: 40x40
|
|
||||||
|
|
||||||
# Force a full display refresh when we press the "boot" button on the devboard
|
# Force a full display refresh when we press the "boot" button on the devboard
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
@@ -108,7 +116,7 @@ display:
|
|||||||
- platform: waveshare_epaper_2bit
|
- platform: waveshare_epaper_2bit
|
||||||
id: display0
|
id: display0
|
||||||
cs_pin: GPIO19
|
cs_pin: GPIO19
|
||||||
dc_pin: GPIO18
|
dc_pin: GPIO17
|
||||||
busy_pin: GPIO4
|
busy_pin: GPIO4
|
||||||
reset_pin: GPIO5
|
reset_pin: GPIO5
|
||||||
model: 2.90inv2-r2-2bpp
|
model: 2.90inv2-r2-2bpp
|
||||||
@@ -134,16 +142,35 @@ lvgl:
|
|||||||
theme:
|
theme:
|
||||||
label:
|
label:
|
||||||
text_color: 0x000000
|
text_color: 0x000000
|
||||||
# button:
|
button:
|
||||||
# bg_color: 0x000000
|
bg_color: 0xAAAAAA
|
||||||
# text_color: 0xFFFFFF
|
text_color: 0xFFFFFF
|
||||||
|
height: 64
|
||||||
|
width: 64
|
||||||
|
pad_all: 0
|
||||||
|
border_width: 5
|
||||||
|
border_color: 0xFFFFFF
|
||||||
obj:
|
obj:
|
||||||
bg_color: 0xFFFFFF
|
bg_color: 0xFFFFFF
|
||||||
widgets:
|
widgets:
|
||||||
- label:
|
- label:
|
||||||
text: 'Test 2bpp 1326'
|
text: 'Test 2bpp 1532'
|
||||||
align: TOP_LEFT
|
align: TOP_LEFT
|
||||||
text_font: font1
|
text_font: font1
|
||||||
|
- button:
|
||||||
|
id: button0
|
||||||
|
align: TOP_RIGHT
|
||||||
|
widgets:
|
||||||
|
- image:
|
||||||
|
src: home_lock_open
|
||||||
|
outline_width: 1
|
||||||
|
- button:
|
||||||
|
id: button1
|
||||||
|
align: BOTTOM_RIGHT
|
||||||
|
widgets:
|
||||||
|
- image:
|
||||||
|
src: home_lock
|
||||||
|
outline_width: 1
|
||||||
# - label:
|
# - label:
|
||||||
# text: "0xFFFFFF"
|
# text: "0xFFFFFF"
|
||||||
# text_color: 0xFFFFFF
|
# text_color: 0xFFFFFF
|
||||||
@@ -164,37 +191,31 @@ lvgl:
|
|||||||
# text_color: 0x000000
|
# text_color: 0x000000
|
||||||
# x: 0
|
# x: 0
|
||||||
# y: 60
|
# y: 60
|
||||||
- obj:
|
# - obj:
|
||||||
align: BOTTOM_LEFT
|
# align: BOTTOM_LEFT
|
||||||
width: 33%
|
# width: 33%
|
||||||
height: 30%
|
# height: 30%
|
||||||
bg_color: 0x000000 #Black
|
# bg_color: 0x000000 #Black
|
||||||
- obj:
|
# - obj:
|
||||||
align: BOTTOM_MID
|
# align: BOTTOM_MID
|
||||||
width: 33%
|
# width: 33%
|
||||||
height: 30%
|
# height: 30%
|
||||||
bg_color: 0x555555 #Dark Grey
|
# bg_color: 0x555555 #Dark Grey
|
||||||
- obj:
|
# - obj:
|
||||||
align: BOTTOM_RIGHT
|
# align: BOTTOM_RIGHT
|
||||||
width: 33%
|
# width: 33%
|
||||||
height: 30%
|
# height: 30%
|
||||||
bg_color: 0xAAAAAA #Light Grey
|
# bg_color: 0xAAAAAA #Light Grey
|
||||||
- obj:
|
# - obj:
|
||||||
align: TOP_RIGHT
|
# align: TOP_RIGHT
|
||||||
width: 33%
|
# width: 33%
|
||||||
height: 30%
|
# height: 30%
|
||||||
bg_color: 0xFFFFFF #White
|
# bg_color: 0xFFFFFF #White
|
||||||
- obj:
|
# - obj:
|
||||||
align: LEFT_MID
|
# align: LEFT_MID
|
||||||
width: 66%
|
# width: 66%
|
||||||
height: 30%
|
# height: 30%
|
||||||
bg_color: 0x000000
|
# bg_color: 0x000000
|
||||||
bg_grad_color: 0xFFFFFF
|
# bg_grad_color: 0xFFFFFF
|
||||||
bg_grad_dir: HOR
|
# bg_grad_dir: HOR
|
||||||
- button:
|
|
||||||
id: button0
|
|
||||||
align: TOP_RIGHT
|
|
||||||
widgets:
|
|
||||||
- image:
|
|
||||||
src: home_lock_open
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user