Files
esphome-configs/mcu-tft.yaml
T
randy 6a51099789 common: ipv6_only package for the IPv6-only IoT network
- common/wifi.yaml: the network gets id wifi_iot, so devices can
  override it with '!extend wifi_iot'
- common/ipv6_only.yaml: add-on package next to any common package;
  switches to the IPv6-only SSID, wifi ipv6_only (SLAAC, no DHCPv4,
  esphome/esphome#19750 as external component until merged) and
  min_ipv6_addr_count: 1
- mcu-lvgl-trainer, mcu-nspanel-dev, mcu-rfid-reader, mcu-stackchan,
  mcu-tft moved to the IPv6-only network
2026-09-27 21:26:02 +02:00

115 lines
2.2 KiB
YAML

---
substitutions:
device: tft
name: TFT
area: DEV
comment: "${area} | Desk TFT Display"
esphome:
name: mcu-${device}
friendly_name: ${name}
area: ${area}
comment: ${comment}
platformio_options:
board_build.flash_mode: dio
esp32:
variant: esp32c3
framework:
type: esp-idf
packages:
common: !include common/common.yaml
ipv6_only: !include common/ipv6_only.yaml
logger:
logs:
component: ERROR
# GPIO1 UART TX
# GPIO3 UART RX
# GPIO4 I2C SDA
# GPIO5 I2C SCL
# GPIO12 DISPLAY DIO
# GPIO12 DISPLAY CLOCK
# GPIO14 BUZZER
# GPIO16 RGB
spi:
clk_pin: 4
mosi_pin: 5
miso_pin: 6
color:
- id: my_green
hex: 00ff00
- id: my_magenta
hex: ff00ff
- id: my_red
hex: ff0000
- id: my_white
hex: ffffff
font:
- file: "gfonts://Roboto"
id: font_default
size: 20
- file: "gfonts://B612"
id: b612_24
size: 24
- file: "gfonts://B612"
id: b612_16
size: 16
- file: "gfonts://B612"
id: b612_12
size: 12
- file: "gfonts://B612 Mono"
id: b612_24_mono
size: 24
- file: "gfonts://B612 Mono"
id: b612_16_mono
size: 16
- file: "gfonts://B612 Mono"
id: b612_12_mono
size: 12
- file: "gfonts://Roboto"
id: roboto_32
size: 32
- file: "gfonts://Roboto"
id: roboto_24
size: 24
- file: "gfonts://Roboto"
id: roboto_16
size: 16
- file: "gfonts://Roboto"
id: roboto_12
size: 12
- file: "gfonts://Roboto Mono"
id: roboto_32_mono
size: 32
- file: "gfonts://Roboto Mono"
id: roboto_24_mono
size: 24
- file: "gfonts://Roboto Mono"
id: roboto_16_mono
size: 16
- file: "gfonts://Roboto Mono"
id: roboto_12_mono
size: 12
display:
- platform: mipi_spi
model: ILI9341
cs_pin: 7
dc_pin: 8
reset_pin: 10
invert_colors: false
lambda: |-
it.fill(Color::BLACK);
it.print(0, 0, id(b612_12), id(my_white), TextAlign::TOP_LEFT, "HELLO WORLD!");
it.print(0, 14, id(b612_12), id(my_green), TextAlign::TOP_LEFT, "HELLO WORLD!");
it.print(0, 28, id(b612_12), id(my_magenta), TextAlign::TOP_LEFT, "HELLO WORLD!");
it.print(0, 42, id(b612_12), id(my_red), TextAlign::TOP_LEFT, "HELLO WORLD!");