diff --git a/waveshare-test.yaml b/waveshare-test.yaml index bb9f0bb..15407dc 100644 --- a/waveshare-test.yaml +++ b/waveshare-test.yaml @@ -9,12 +9,14 @@ # |--- |--- |--- |--- | # |5V |VIN |Pin2/5V |Red | # |GND |GND |Pin6/GND |Blk | -# |Display SCLK |GPIO23 |Pin23/GPIO11/SPI0_SCLK |Blue | -# |Display MOSI |GPIO22 |Pin19/GPIO10/SPI0_MOSI |Green | +# |Display SCLK |GPIO18 |Pin23/GPIO11/SPI0_SCLK |Blue | +# |Display MOSI |GPIO23 |Pin19/GPIO10/SPI0_MOSI |Green | # |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 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 # --- @@ -57,11 +59,14 @@ captive_portal: # For the display spi: - clk_pin: GPIO23 - mosi_pin: GPIO22 + clk_pin: GPIO18 + mosi_pin: GPIO23 # For the touchscreen -# ... +i2c: + sda: GPIO21 + scl: GPIO22 + scan: false ### Okay, now the Good Stuff ### @@ -80,12 +85,15 @@ font: # Pull in some icons from the material design library image: + defaults: + transparency: chroma_key + invert_alpha: false + resize: 54x54 + binary: - file: "mdi:home-lock-open" id: home_lock_open - type: binary - transparency: chroma_key - invert_alpha: true - resize: 40x40 + - file: "mdi:home-lock" + id: home_lock # Force a full display refresh when we press the "boot" button on the devboard binary_sensor: @@ -108,7 +116,7 @@ display: - platform: waveshare_epaper_2bit id: display0 cs_pin: GPIO19 - dc_pin: GPIO18 + dc_pin: GPIO17 busy_pin: GPIO4 reset_pin: GPIO5 model: 2.90inv2-r2-2bpp @@ -134,16 +142,35 @@ lvgl: theme: label: text_color: 0x000000 - # button: - # bg_color: 0x000000 - # text_color: 0xFFFFFF + button: + bg_color: 0xAAAAAA + text_color: 0xFFFFFF + height: 64 + width: 64 + pad_all: 0 + border_width: 5 + border_color: 0xFFFFFF obj: bg_color: 0xFFFFFF widgets: - label: - text: 'Test 2bpp 1326' + text: 'Test 2bpp 1532' align: TOP_LEFT 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: # text: "0xFFFFFF" # text_color: 0xFFFFFF @@ -164,37 +191,31 @@ lvgl: # text_color: 0x000000 # x: 0 # y: 60 - - obj: - align: BOTTOM_LEFT - width: 33% - height: 30% - bg_color: 0x000000 #Black - - obj: - align: BOTTOM_MID - width: 33% - height: 30% - bg_color: 0x555555 #Dark Grey - - obj: - align: BOTTOM_RIGHT - width: 33% - height: 30% - bg_color: 0xAAAAAA #Light Grey - - obj: - align: TOP_RIGHT - width: 33% - height: 30% - bg_color: 0xFFFFFF #White - - obj: - align: LEFT_MID - width: 66% - height: 30% - bg_color: 0x000000 - bg_grad_color: 0xFFFFFF - bg_grad_dir: HOR - - button: - id: button0 - align: TOP_RIGHT - widgets: - - image: - src: home_lock_open + # - obj: + # align: BOTTOM_LEFT + # width: 33% + # height: 30% + # bg_color: 0x000000 #Black + # - obj: + # align: BOTTOM_MID + # width: 33% + # height: 30% + # bg_color: 0x555555 #Dark Grey + # - obj: + # align: BOTTOM_RIGHT + # width: 33% + # height: 30% + # bg_color: 0xAAAAAA #Light Grey + # - obj: + # align: TOP_RIGHT + # width: 33% + # height: 30% + # bg_color: 0xFFFFFF #White + # - obj: + # align: LEFT_MID + # width: 66% + # height: 30% + # bg_color: 0x000000 + # bg_grad_color: 0xFFFFFF + # bg_grad_dir: HOR