mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
[epaper_spi] Add T133A01 6-color e-paper driver for reTerminal E1004 (#16706)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Claude Opus 4.8
Clyde Stubbs
parent
e94fcda8b7
commit
7878052533
@@ -154,6 +154,10 @@ def test_all_predefined_models(
|
||||
if not model.get_default(CONF_CS_PIN):
|
||||
config[CONF_CS_PIN] = 5
|
||||
|
||||
# Dual-CS models (e.g. T133A01) require a second chip-select pin
|
||||
if model.manages_cs and not model.get_default("cs1_pin"):
|
||||
config["cs1_pin"] = 4
|
||||
|
||||
# Select an ESP32 variant on which all of this model's pins are valid
|
||||
# (some models default to high-numbered pins only present on the S3).
|
||||
choose_variant_with_pins(_pins_for(model, config))
|
||||
@@ -204,6 +208,10 @@ def test_individual_models(
|
||||
if not model.get_default(CONF_CS_PIN):
|
||||
config[CONF_CS_PIN] = 5
|
||||
|
||||
# Dual-CS models (e.g. T133A01) require a second chip-select pin
|
||||
if model.manages_cs and not model.get_default("cs1_pin"):
|
||||
config["cs1_pin"] = 4
|
||||
|
||||
# Select an ESP32 variant on which all of this model's pins are valid
|
||||
# (some models default to high-numbered pins only present on the S3).
|
||||
choose_variant_with_pins(_pins_for(model, config))
|
||||
|
||||
@@ -76,6 +76,14 @@ display:
|
||||
|
||||
- platform: epaper_spi
|
||||
model: seeed-reterminal-e1002
|
||||
- platform: epaper_spi
|
||||
model: seeed-reterminal-e1004
|
||||
cs_pin: 33
|
||||
cs1_pin: 34
|
||||
dc_pin: 35
|
||||
reset_pin: 36
|
||||
busy_pin: 37
|
||||
enable_pin: 39
|
||||
- platform: epaper_spi
|
||||
model: seeed-ee04-mono-4.26
|
||||
full_update_every: 10
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
esphome:
|
||||
name: e1004-test
|
||||
friendly_name: E1004 Test
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
variant: esp32s3
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
|
||||
spi:
|
||||
- id: epaper_spi_bus
|
||||
clk_pin: GPIO7
|
||||
mosi_pin: GPIO9
|
||||
|
||||
display:
|
||||
- platform: epaper_spi
|
||||
spi_id: epaper_spi_bus
|
||||
model: seeed-reterminal-e1004
|
||||
update_interval: never
|
||||
lambda: |-
|
||||
it.fill(Color::WHITE);
|
||||
it.rectangle(10, 10, it.get_width() - 20, it.get_height() - 20, Color::BLACK);
|
||||
it.print(it.get_width() / 2, it.get_height() / 2, id(my_font), Color::BLACK, TextAlign::CENTER, "E1004 Test");
|
||||
it.circle(100, 100, 30, Color(255, 0, 0));
|
||||
it.circle(200, 100, 30, Color(0, 255, 0));
|
||||
it.circle(300, 100, 30, Color(0, 0, 255));
|
||||
it.circle(400, 100, 30, Color(255, 255, 0));
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: my_font
|
||||
size: 20
|
||||
|
||||
logger:
|
||||
Reference in New Issue
Block a user