- 积分
- 334
- 金钱
- 311
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 334
- 金钱
- 311
- HASS币
- 0
|
发表于 2022-9-25 00:08:33
|
显示全部楼层
你先试试这个?我的可以显示(esphome官网里面的例子)
spi:
clk_pin: GPIO14
mosi_pin: GPIO13
miso_pin: GPIO12
display:
- platform: st7735
model: "INITR_18BLACKTAB"
reset_pin: 2
cs_pin: 5
dc_pin: 4
rotation: 0
device_width: 128
device_height: 160
col_start: 0
row_start: 0
eight_bit_color: true
update_interval: 5s
lambda: |-
auto red = Color(255, 0, 0);
auto green = Color(0, 255, 0);
auto blue = Color(0, 0, 255);
auto white = Color(255, 255, 255);
it.rectangle(20, 50, 30, 30, white);
it.rectangle(25, 55, 30, 30, red);
it.rectangle(30, 60, 30, 30, green);
it.rectangle(35, 65, 30, 30, blue); |
|