I purchased a couple of ST7735 TFT displays from AliExpress (the 1.8" from here) and have been trying to make it work with ESPHome but I can’t seem to make it render properly.
The display is connected to the board as follows:
Display | NodeMCU |
---|---|
VCC | 3.3v |
GND | GND |
CS | D8 |
RESET | D3 |
A0 | D4 |
SDA | D7 |
SCK | D5 |
LED | 3.3v |
My YAML file:
substitutions:
device_name: testing-board
id_prefix: testing_board
friendly_name: "Testing"
platform: ESP8266
board: nodemcuv2
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
captive_portal:
logger:
api:
time:
- platform: homeassistant
id: homeassistant_time
esphome:
name: ${device_name}
platform: ${platform}
board: ${board}
font:
- file: 'fonts/DroidSansMono.ttf'
id: mono8
size: 8
spi:
clk_pin: D5
mosi_pin: D7
display:
- platform: st7735
model: "INITR_REDTAB"
reset_pin: D3
cs_pin: D8
dc_pin: D4
rotation: 0
device_width: 128
device_height: 160
col_start: 0
row_start: 0
eight_bit_color: true
update_interval: 5s
lambda: |-
// Write some text
it.print(10, 10, id(mono8), "Hello World!");
// Draw a circle in the middle of the display
it.filled_circle(it.get_width() / 2, it.get_height() / 2, 20);
The screen does seem to be receiving instructions, however, it’s not rendering correctly. With the YAML above, I expected to see a circle in the middle with a “Hello world” text on top, however, this is what I get:
What am I missing?