Mercurial > code > home > repos > homeauto
comparison espNode/theater_lcd.yaml @ 1716:2bed2f68243c
older work
author | drewp@bigasterisk.com |
---|---|
date | Sun, 07 Aug 2022 02:25:40 -0700 |
parents | d88085f35745 |
children |
comparison
equal
deleted
inserted
replaced
1715:8578afcae65e | 1716:2bed2f68243c |
---|---|
1 | |
2 esphome: | 1 esphome: |
3 name: theater_lcd | 2 name: theater_lcd |
4 platform: ESP32 | 3 platform: ESP32 |
5 board: esp32cam | 4 board: esp32cam |
6 build_path: build | 5 includes: |
6 - component/keypad.h | |
7 | 7 |
8 wifi: | 8 wifi: |
9 ssid: !secret wifi_ssid | 9 ssid: !secret wifi_ssid |
10 password: !secret wifi_password | 10 password: !secret wifi_password |
11 domain: '' | 11 domain: "" |
12 use_address: "10.2.0.39" | |
12 | 13 |
13 mqtt: | 14 mqtt: |
14 broker: '10.2.0.1' | 15 broker: "10.2.0.1" |
15 port: 1883 | 16 port: 1883 |
16 username: '' | 17 username: "" |
17 password: '' | 18 password: "" |
18 | 19 |
19 logger: | 20 logger: |
20 baud_rate: 115200 | 21 baud_rate: 115200 |
21 level: DEBUG | 22 level: DEBUG |
22 | 23 |
23 ota: | 24 ota: |
24 | 25 |
25 # image: | 26 # image: |
26 # - file: "colorscape.png" | 27 # - file: "colorscape.png" |
27 # id: colorscape | 28 # id: colorscape |
35 - file: "Teko/Teko-Regular.ttf" | 36 - file: "Teko/Teko-Regular.ttf" |
36 id: font_teko_small | 37 id: font_teko_small |
37 size: 60 | 38 size: 60 |
38 glyphs: "+-_.:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ " | 39 glyphs: "+-_.:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ " |
39 | 40 |
41 custom_component: | |
42 - lambda: |- | |
43 auto my_custom = new KeypadComponent(); | |
44 return {my_custom}; | |
45 | |
46 # set these to input for KeypadComponent | |
47 # binary_sensor: | |
48 # - { platform: gpio, pin: GPIO36, name: "input36" } | |
49 # - { platform: gpio, pin: GPIO39, name: "input39" } | |
50 # - { platform: gpio, pin: GPIO34, name: "input34" } | |
51 # - { platform: gpio, pin: GPIO35, name: "input35" } | |
52 | |
53 | |
54 # for keyboard: | |
55 # GPIO23 col1 orn | |
56 # GPIO36 rowA yel (input only gpio) | |
57 # GPIO39 rowB grn (input only gpio) | |
58 # GPIO34 rowC blu (input only gpio) | |
59 # GPIO35 rowD brn (input only gpio) | |
60 # GPIO22 col0 gry | |
61 | |
40 display: | 62 display: |
41 - platform: ili9486_8bit | 63 - platform: ili9486_8bit |
42 model: 'TFT_3.5' | 64 model: "TFT_3.5" |
43 id: lcd | 65 id: lcd |
44 cs_pin: GPIO16 # wh | 66 cs_pin: GPIO16 # wh |
45 dc_pin: GPIO17 # gy | 67 dc_pin: GPIO17 # gy |
46 wr_pin: GPIO5 # pu | 68 wr_pin: GPIO5 # pu |
47 rd_pin: GPIO18 # bk | 69 rd_pin: GPIO18 # bk |
48 data_pins: | 70 data_pins: |
49 - GPIO33 # gy | 71 - GPIO33 # gy |
50 - GPIO32 # bk | 72 - GPIO32 # bk |
51 - GPIO13 # pu | 73 - GPIO13 # pu |
52 - GPIO12 # bl | 74 - GPIO12 # bl |
53 - GPIO14 # gn | 75 - GPIO14 # gn |
54 - GPIO27 # ye | 76 - GPIO27 # ye |
55 - GPIO26 # or | 77 - GPIO26 # or |
56 - GPIO25 # re | 78 - GPIO25 # re |
57 rotation: 90 | 79 rotation: 90 |
58 lambda: |- | 80 lambda: |- |
59 it.clear(); // may be cheaper to get text extent and fill that box only | 81 it.clear(); // may be cheaper to get text extent and fill that box only |
60 { | 82 { |
61 const std::string line = id(line1).state; | 83 const std::string line = id(line1).state; |
90 } | 112 } |
91 it.print(0, 150, id(font_teko_small), color, text); | 113 it.print(0, 150, id(font_teko_small), color, text); |
92 | 114 |
93 } | 115 } |
94 | 116 |
95 | |
96 text_sensor: | 117 text_sensor: |
97 - platform: mqtt_subscribe | 118 - platform: mqtt_subscribe |
98 name: "line1" | 119 name: "line1" |
99 id: line1 | 120 id: line1 |
100 topic: theater_lcd/line1 | 121 topic: theater_lcd/line1 |
106 id: line2 | 127 id: line2 |
107 topic: theater_lcd/line2 | 128 topic: theater_lcd/line2 |
108 on_value: | 129 on_value: |
109 then: | 130 then: |
110 - component.update: lcd | 131 - component.update: lcd |
111 | |
112 # ili9486 setup | 132 # ili9486 setup |
113 # http://www.lcdwiki.com/3.5inch_Arduino_Display-UNO | 133 # http://www.lcdwiki.com/3.5inch_Arduino_Display-UNO |
114 # (https://www.aliexpress.com/item/4000055026873.html $12) | 134 # (https://www.aliexpress.com/item/4000055026873.html $12) |
115 # and https://circuits4you.com/wp-content/uploads/2018/12/ESP32-Pinout.jpg | 135 # and https://circuits4you.com/wp-content/uploads/2018/12/ESP32-Pinout.jpg |
116 # | 136 # |