changeset 1716:2bed2f68243c

older work
author drewp@bigasterisk.com
date Sun, 07 Aug 2022 02:25:40 -0700
parents 8578afcae65e
children e9540ee0cf73
files espNode/office_back_cam.yaml espNode/tasks.py espNode/theater_lcd.yaml
diffstat 3 files changed, 81 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/espNode/office_back_cam.yaml	Thu May 05 00:05:27 2022 -0700
+++ b/espNode/office_back_cam.yaml	Sun Aug 07 02:25:40 2022 -0700
@@ -18,7 +18,7 @@
 #nc
 
 esphome:
-  name: workshop_cam
+  name: office-back-cam
   platform: ESP32
   board: esp32cam
   build_path: office_back_cam
@@ -27,7 +27,7 @@
   ssid: !secret wifi_ssid
   password: !secret wifi_password
   domain: ''
-  use_address: 10.2.0.39
+  use_address: 10.2.0.22
 
 mqtt:
   broker: '10.2.0.1'
@@ -45,15 +45,33 @@
 #   - platform: fastled_clockless
 #     chipset: WS2812B
 #     pin: GPIO13
-#     num_leds: 1
+#     num_leds: 20
 #     rgb_order: GRB
 #     name: "strip"
-#   # - platform: monochromatic
-#   #   name: "flash"
-#   #   output: flash_out
-#   - platform: binary
-#     output: gpio_4
-#     name: flash
+#     effects:
+#       - addressable_color_wipe:
+#       - addressable_color_wipe:
+#           name: Custom1
+#           colors:
+#             - red: 100%
+#               green: 100%
+#               blue: 100%
+#               num_leds: 1
+#             - red: 0%
+#               green: 0%
+#               blue: 0%
+#               num_leds: 1
+#           add_led_interval: 100ms
+#           reverse: false
+#       - addressable_twinkle:
+
+
+  # - platform: monochromatic
+  #   name: "flash"
+  #   output: flash_out
+  # - platform: binary
+  #   output: gpio_4
+  #   name: flash
 
   
 # dallas:
@@ -65,8 +83,8 @@
 #     index: 0
 #     name: temperature
 
-# output:
-#   - platform: ledc
-#     id: flash_out
-#     pin: GPIO4
-#     frequency: 19531Hz
+output:
+  - platform: ledc
+    id: flash_out
+    pin: GPIO4
+    frequency: 19531Hz
--- a/espNode/tasks.py	Thu May 05 00:05:27 2022 -0700
+++ b/espNode/tasks.py	Sun Aug 07 02:25:40 2022 -0700
@@ -27,9 +27,15 @@
 
 @task
 def program_board_over_wifi(ctx, board):
+    global esphome
     board = board.replace('.yaml', '')
+    if board == 'theater_lcd':
+        tag = 'esphome_dev'
+        esphome = 'esphome-local/env/bin/esphome'
+
     ctx.run(f"{esphome} {board}.yaml run", pty=True)
 
+
 @task
 def monitor_usb(ctx, board):
     board = board.replace('.yaml', '')
--- a/espNode/theater_lcd.yaml	Thu May 05 00:05:27 2022 -0700
+++ b/espNode/theater_lcd.yaml	Sun Aug 07 02:25:40 2022 -0700
@@ -1,25 +1,26 @@
-
 esphome:
   name: theater_lcd
   platform: ESP32
   board: esp32cam
-  build_path: build
+  includes:
+    - component/keypad.h
 
 wifi:
   ssid: !secret wifi_ssid
   password: !secret wifi_password
-  domain: ''
+  domain: ""
+  use_address: "10.2.0.39"
 
 mqtt:
-  broker: '10.2.0.1'
+  broker: "10.2.0.1"
   port: 1883
-  username: ''
-  password: ''
-  
+  username: ""
+  password: ""
+
 logger:
   baud_rate: 115200
   level: DEBUG
-  
+
 ota:
 
 # image:
@@ -37,23 +38,44 @@
     size: 60
     glyphs: "+-_.:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ "
 
+custom_component:
+  - lambda: |-
+      auto my_custom = new KeypadComponent();
+      return {my_custom};
+
+# set these to input for KeypadComponent
+# binary_sensor:
+#   - { platform: gpio, pin: GPIO36, name: "input36" }
+#   - { platform: gpio, pin: GPIO39, name: "input39" }
+#   - { platform: gpio, pin: GPIO34, name: "input34" }
+#   - { platform: gpio, pin: GPIO35, name: "input35" }
+
+
+# for keyboard:
+#   GPIO23 col1  orn
+#   GPIO36 rowA  yel (input only gpio)
+#   GPIO39 rowB  grn (input only gpio)
+#   GPIO34 rowC  blu (input only gpio)
+#   GPIO35 rowD  brn (input only gpio)
+#   GPIO22 col0  gry
+
 display:
   - platform: ili9486_8bit
-    model: 'TFT_3.5'
+    model: "TFT_3.5"
     id: lcd
-    cs_pin: GPIO16   # wh
-    dc_pin: GPIO17   # gy
-    wr_pin: GPIO5    # pu
-    rd_pin: GPIO18   # bk
+    cs_pin: GPIO16 # wh
+    dc_pin: GPIO17 # gy
+    wr_pin: GPIO5 # pu
+    rd_pin: GPIO18 # bk
     data_pins:
-      - GPIO33   # gy
-      - GPIO32   # bk
-      - GPIO13   # pu
-      - GPIO12   # bl
-      - GPIO14   # gn
-      - GPIO27   # ye
-      - GPIO26   # or
-      - GPIO25   # re
+      - GPIO33 # gy
+      - GPIO32 # bk
+      - GPIO13 # pu
+      - GPIO12 # bl
+      - GPIO14 # gn
+      - GPIO27 # ye
+      - GPIO26 # or
+      - GPIO25 # re
     rotation: 90
     lambda: |-
       it.clear(); // may be cheaper to get text extent and fill that box only
@@ -92,7 +114,6 @@
 
       }
 
-
 text_sensor:
   - platform: mqtt_subscribe
     name: "line1"
@@ -108,7 +129,6 @@
     on_value:
       then:
         - component.update: lcd
-
 # ili9486 setup
 # http://www.lcdwiki.com/3.5inch_Arduino_Display-UNO
 # (https://www.aliexpress.com/item/4000055026873.html $12)