view esp/do-squib-touch-lcd.yaml @ 7:b46679798c51

mv esp code to this repo. still trying to get correct refreshes
author drewp@bigasterisk.com
date Sun, 10 Mar 2024 15:03:53 -0700
parents
children 47795c3121f1
line wrap: on
line source

esphome:
  name: do-squib-touch-lcd
  friendly_name: do-squib-touch-lcd
  includes:
  - update_lcd_block.h

esp32:
  board: denky32
  framework:
# ard
# [18:48:34][D][debug:080]: Free Heap Size: 107148 bytes
# [18:48:34][D][debug:110]: Flash Chip: Size=4096kB Speed=80MHz Mode=DIO
    type: arduino

# esp
# [18:50:26][D][debug:080]: Free Heap Size: 54488 bytes
    # type: esp-idf
    # sdkconfig_options:
    #   COMPILER_OPTIMIZATION_SIZE: y

debug:
  update_interval: 20s

logger:
  level: DEBUG

mqtt:
  broker: "mqtt2.bigasterisk.com"
  port: 1883
  username: ""
  password: ""
  id: mqtt_client
  on_message:
    topic: 'display/squib/updates'
    then:
    - lambda: |-
       update_lcd_block(id(lcd), x);
light:
  - platform: status_led
    id: "status_out"
    pin: 2

  - platform: monochromatic
    output: lcd_bright
    id: back_light
    name: lcd_bright
    restore_mode: ALWAYS_ON
    
ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
 
spi:
  clk_pin: GPIO21
  mosi_pin: GPIO32
  miso_pin: GPIO4

output:
  - platform: ledc
    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
 
# 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
# --- #------
# 3v3 # 1 VCC
# gnd # 2 GND
# 4   # 3 CS low=enable
# 16  # 4 RESET
# 17  # 5 DC / RS
# 18  # 6 SDI (MOSI)
# 19  # 7 SCK
# 21  # 8 LED
# 34  # 9 SDO (MISO)
#     
# 32  # 10 T_CLK
# 33  # 11 T_CS
# 25  # 12 T_DIN
# 27  # 13 T_DO
# 26  # 14 T_IRQ (used?)

# For ESP32-WROOM Series of modules, GPIO6 ~ GPIO11 are pins for flash and cannot
# be set for other uses.

####################################################

# little board, also WROOM32, has these pins near each other:
#  gnd 27 25 22 32 21 17 4 16 0 gnd 2 vcc ... rst gnd 36 18 35 19 33 23 34 5 3v3 
#  *   *  *  *  *  *             *                    ro *  ro *  *  *  ro  *  *

# esp # lcdboard
# --- #------
# 3v3 # 1 VCC
# gnd # 2 GND
# 27  # 3 CS low=enable
# 25  # 4 RESET
# 22  # 5 DC / RS
# 32  # 6 SDI (MOSI)
# 21  # 7 SCK
# 17  # 8 LED
# 4   # 9 SDO (MISO)
#     
# 33  # 10 T_CLK
# 19  # 11 T_CS
# 35  # 12 T_DIN
# 18  # 13 T_DO
# 23  # 14 T_IRQ (used?)










# mosquitto_pub -h mqtt2 -t do-squib-touch-lcd/light/lcd_bright/command -m '{"brightness":255,"state":"ON"}'