esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

Can't get a ST7735 display to render properly #3513

Closed jrfernandes closed 2 years ago

jrfernandes commented 2 years ago

The problem

I can't get an ST7735 TFT display (the 1.8" from here) to 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

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:

IMG_8079

What am I missing?

Which version of ESPHome has the issue?

2022.3.1

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.7.7

What platform are you using?

ESP8266

Board

nodemcu

Component causing the issue

ST7735

Example YAML snippet

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"  # Also tried INITR_18REDTAB, same results
    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);
jrfernandes commented 2 years ago

Using the model INITR_BLACKTAB made it work.