diff esp/do-squib-touch-lcd.yaml @ 8:47795c3121f1

bufferless updates! mqtt message is sent over SPI and everything works
author drewp@bigasterisk.com
date Mon, 11 Mar 2024 01:37:57 -0700
parents b46679798c51
children
line wrap: on
line diff
--- a/esp/do-squib-touch-lcd.yaml	Sun Mar 10 15:03:53 2024 -0700
+++ b/esp/do-squib-touch-lcd.yaml	Mon Mar 11 01:37:57 2024 -0700
@@ -34,7 +34,7 @@
     topic: 'display/squib/updates'
     then:
     - lambda: |-
-       update_lcd_block(id(lcd), x);
+       update_lcd_block(static_cast<ili9xxx::ILI9481Direct*>(id(lcd)), x);
 light:
   - platform: status_led
     id: "status_out"
@@ -62,20 +62,14 @@
     pin: GPIO17
     id: lcd_bright
 
-display:
-  - platform: ili9xxx
-    id: lcd
-    model: ILI9481-18
-    dc_pin: GPIO22
-    reset_pin: GPIO25
-    cs_pin: GPIO27
-    dimensions:
-      width: 320
-      height: 320
-    data_rate: "10MHz"
-    update_interval: "never"
-    auto_clear_enabled: false
  
+custom_component:
+- lambda: |-
+    auto my_custom = new esphome::ili9xxx::ILI9481Direct(spi_spicomponent);
+    return {my_custom};
+  components:
+  - id: lcd
+
 # breakout kit esp board has these neighbors: gnd 13 12 14 26 27 25 33 32 35 34 *and* 21 19 18 5 17 16 4 2 15 gnd 3v3
 
 # esp # lcdboard