Mercurial > code > home > repos > front-door-display
annotate 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 |
rev | line source |
---|---|
7
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
1 esphome: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
2 name: do-squib-touch-lcd |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
3 friendly_name: do-squib-touch-lcd |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
4 includes: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
5 - update_lcd_block.h |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
6 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
7 esp32: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
8 board: denky32 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
9 framework: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
10 # ard |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
11 # [18:48:34][D][debug:080]: Free Heap Size: 107148 bytes |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
12 # [18:48:34][D][debug:110]: Flash Chip: Size=4096kB Speed=80MHz Mode=DIO |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
13 type: arduino |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
14 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
15 # esp |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
16 # [18:50:26][D][debug:080]: Free Heap Size: 54488 bytes |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
17 # type: esp-idf |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
18 # sdkconfig_options: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
19 # COMPILER_OPTIMIZATION_SIZE: y |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
20 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
21 debug: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
22 update_interval: 20s |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
23 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
24 logger: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
25 level: DEBUG |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
26 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
27 mqtt: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
28 broker: "mqtt2.bigasterisk.com" |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
29 port: 1883 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
30 username: "" |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
31 password: "" |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
32 id: mqtt_client |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
33 on_message: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
34 topic: 'display/squib/updates' |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
35 then: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
36 - lambda: |- |
8
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
37 update_lcd_block(static_cast<ili9xxx::ILI9481Direct*>(id(lcd)), x); |
7
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
38 light: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
39 - platform: status_led |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
40 id: "status_out" |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
41 pin: 2 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
42 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
43 - platform: monochromatic |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
44 output: lcd_bright |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
45 id: back_light |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
46 name: lcd_bright |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
47 restore_mode: ALWAYS_ON |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
48 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
49 ota: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
50 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
51 wifi: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
52 ssid: !secret wifi_ssid |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
53 password: !secret wifi_password |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
54 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
55 spi: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
56 clk_pin: GPIO21 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
57 mosi_pin: GPIO32 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
58 miso_pin: GPIO4 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
59 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
60 output: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
61 - platform: ledc |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
62 pin: GPIO17 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
63 id: lcd_bright |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
64 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
65 |
8
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
66 custom_component: |
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
67 - lambda: |- |
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
68 auto my_custom = new esphome::ili9xxx::ILI9481Direct(spi_spicomponent); |
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
69 return {my_custom}; |
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
70 components: |
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
71 - id: lcd |
47795c3121f1
bufferless updates! mqtt message is sent over SPI and everything works
drewp@bigasterisk.com
parents:
7
diff
changeset
|
72 |
7
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
73 # 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 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
74 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
75 # esp # lcdboard |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
76 # --- #------ |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
77 # 3v3 # 1 VCC |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
78 # gnd # 2 GND |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
79 # 4 # 3 CS low=enable |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
80 # 16 # 4 RESET |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
81 # 17 # 5 DC / RS |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
82 # 18 # 6 SDI (MOSI) |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
83 # 19 # 7 SCK |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
84 # 21 # 8 LED |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
85 # 34 # 9 SDO (MISO) |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
86 # |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
87 # 32 # 10 T_CLK |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
88 # 33 # 11 T_CS |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
89 # 25 # 12 T_DIN |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
90 # 27 # 13 T_DO |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
91 # 26 # 14 T_IRQ (used?) |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
92 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
93 # For ESP32-WROOM Series of modules, GPIO6 ~ GPIO11 are pins for flash and cannot |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
94 # be set for other uses. |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
95 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
96 #################################################### |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
97 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
98 # little board, also WROOM32, has these pins near each other: |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
99 # gnd 27 25 22 32 21 17 4 16 0 gnd 2 vcc ... rst gnd 36 18 35 19 33 23 34 5 3v3 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
100 # * * * * * * * ro * ro * * * ro * * |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
101 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
102 # esp # lcdboard |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
103 # --- #------ |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
104 # 3v3 # 1 VCC |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
105 # gnd # 2 GND |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
106 # 27 # 3 CS low=enable |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
107 # 25 # 4 RESET |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
108 # 22 # 5 DC / RS |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
109 # 32 # 6 SDI (MOSI) |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
110 # 21 # 7 SCK |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
111 # 17 # 8 LED |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
112 # 4 # 9 SDO (MISO) |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
113 # |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
114 # 33 # 10 T_CLK |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
115 # 19 # 11 T_CS |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
116 # 35 # 12 T_DIN |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
117 # 18 # 13 T_DO |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
118 # 23 # 14 T_IRQ (used?) |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
119 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
120 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
121 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
122 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
123 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
124 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
125 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
126 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
127 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
128 |
b46679798c51
mv esp code to this repo. still trying to get correct refreshes
drewp@bigasterisk.com
parents:
diff
changeset
|
129 # mosquitto_pub -h mqtt2 -t do-squib-touch-lcd/light/lcd_bright/command -m '{"brightness":255,"state":"ON"}' |