125 lines
2.4 KiB
YAML
125 lines
2.4 KiB
YAML
esphome: # https://devices.esphome.io/devices/seeed-sensecap
|
|
name: sensecap
|
|
friendly_name: SenseCAP
|
|
|
|
esp32:
|
|
variant: esp32s3
|
|
flash_size: 8MB
|
|
framework:
|
|
type: esp-idf
|
|
sdkconfig_options:
|
|
CONFIG_ESPTOOLPY_FLASHSIZE_8MB: y
|
|
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
|
|
CONFIG_ESP32S3_DATA_CACHE_64KB: y
|
|
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
|
|
CONFIG_SPIRAM_RODATA: y
|
|
|
|
psram:
|
|
mode: octal
|
|
speed: 80MHz
|
|
|
|
logger:
|
|
hardware_uart: UART0
|
|
level: DEBUG
|
|
|
|
output:
|
|
- platform: ledc
|
|
pin:
|
|
number: GPIO45
|
|
ignore_strapping_warning: true
|
|
id: ledc_gpio45
|
|
frequency: 100Hz
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO38
|
|
inverted: true
|
|
name: "User Button"
|
|
|
|
i2c:
|
|
- id: bus_a
|
|
sda: GPIO39
|
|
scl: GPIO40
|
|
scan: false
|
|
|
|
spi:
|
|
- id: lcd_spi
|
|
clk_pin: GPIO41
|
|
mosi_pin: GPIO48
|
|
miso_pin: GPIO47
|
|
|
|
pca9554:
|
|
- id: pca9554a_device
|
|
address: 0x20
|
|
pin_count: 16
|
|
|
|
display:
|
|
- platform: mipi_rgb
|
|
model: SEEED-INDICATOR-D1
|
|
id: sensecap_display
|
|
|
|
light:
|
|
- platform: monochromatic
|
|
name: "Backlight"
|
|
id: backlight
|
|
output: ledc_gpio45
|
|
restore_mode: ALWAYS_ON
|
|
|
|
touchscreen:
|
|
platform: ft5x06
|
|
id: sensecap_touchscreen
|
|
transform:
|
|
mirror_x: true
|
|
mirror_y: true
|
|
on_release:
|
|
- if:
|
|
condition: lvgl.is_paused
|
|
then:
|
|
- lvgl.resume:
|
|
- lvgl.widget.redraw:
|
|
- light.turn_on: backlight
|
|
|
|
image:
|
|
- file: https://esphome.io/favicon-512x512.png
|
|
id: boot_logo
|
|
resize: 200x200
|
|
type: RGB565
|
|
transparency: alpha_channel
|
|
|
|
lvgl:
|
|
on_idle:
|
|
timeout: !lambda "return 10000;"
|
|
then:
|
|
- light.turn_off: backlight
|
|
- lvgl.pause:
|
|
|
|
top_layer:
|
|
widgets:
|
|
- obj:
|
|
id: boot_screen
|
|
x: 0
|
|
y: 0
|
|
width: 100%
|
|
height: 100%
|
|
bg_color: 0xffffff
|
|
bg_opa: COVER
|
|
radius: 0
|
|
pad_all: 0
|
|
border_width: 0
|
|
widgets:
|
|
- image:
|
|
align: CENTER
|
|
src: boot_logo
|
|
y: -40
|
|
- spinner:
|
|
align: CENTER
|
|
y: 95
|
|
height: 50
|
|
width: 50
|
|
spin_time: 1s
|
|
arc_length: 60deg
|
|
arc_width: 8
|
|
indicator:
|
|
arc_color: 0x18bcf2
|
|
arc_width: 8 |