esphome / issues

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

TFT ST7735 display white screen esp8266 #3105

Closed Aviv943 closed 1 year ago

Aviv943 commented 2 years ago

The problem

I'm not sure what is the reason, for this white screen. Was trying several esp (including esp32) and 2 screens (same model) This is the link where I purchased from: https://www.aliexpress.com/item/4000016800528.html

Pins: GND -> GND VCC -> 3V3 SCL -> D5 SDA -> D7 RES -> D1 DC -> D2 CS -> D8 BL -> 3V3

photo_2022-03-02_03-23-51

Which version of ESPHome has the issue?

2022.2.5

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

2022.2.0

What platform are you using?

ESP8266

Board

nodemcu

Component causing the issue

st7735

Example YAML snippet

esphome:
  name: e8266

esp8266:
  board: nodemcuv2

logger:

api:

ota:
  password: "xxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "8266 Fallback Hotspot"
    password: "xxx"

captive_portal:

spi:
  clk_pin: D5
  mosi_pin: D7

display:
  - platform: st7735
    model: "INITR_GREENTAB"
    cs_pin: D8
    dc_pin: D1
    rotation: 0
    device_width: 128
    device_height: 160
    col_start: 0
    row_start: 0
    eight_bit_color: true
    update_interval: 5s
    lambda: |-
      it.print(0, 0, id(my_font), "Hello World!");

font:
  - file: fonts/ProductSans_Bold.ttf
    id: my_font
    size: 8

Anything in the logs that might be useful for us?

INFO Reading configuration /config/8266.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing e8266 (board: nodemcuv2; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|-- <ESPAsyncWebServer-esphome> 2.1.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|-- <SPI> 1.0
Compiling .pioenvs/e8266/src/main.cpp.o
Linking .pioenvs/e8266/firmware.elf
RAM:   [====      ]  42.1% (used 34520 bytes from 81920 bytes)
Flash: [====      ]  39.3% (used 410329 bytes from 1044464 bytes)
Building .pioenvs/e8266/firmware.bin
esp8266_copy_factory_bin([".pioenvs/e8266/firmware.bin"], [".pioenvs/e8266/firmware.elf"])
========================= [SUCCESS] Took 4.75 seconds =========================
INFO Successfully compiled program.
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: cc:50:e3:1f:ba:29
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x00065fff...
Compressed 414480 bytes to 288778...
Wrote 414480 bytes (288778 compressed) at 0x00000000 in 6.7 seconds (effective 496.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[03:10:25]{ll\x9c\x9f|\xc4$\xe0<\x8c$\xe4#<\xc7\xc3\xe4\033\x93r\xdb#\xc4c\x8c\xfb''\xdflon\xdc\xe2\xeccx\xc4\xc7$;$;dp\xf3g\xe0\x83$\x84\xdc#g\xe3<\xe4LJb\xc4\xf3go\xe7$\x84\xc7l`\xd8\033\033'g\x8fdg{\xc7ۛ';;\x9b 8\xfbn\xe0;\xc4\xdcܜ\xc0\xc4co\xe3|\x87b\xc4\xfbgg\xe7\xc7d`\xd8\033\033'g\x8fdg{\xc7ۛ';\033d ;ۛ';\033d \xdc\x84\xc7;\xc7$d`\xfc\xc3n\xdcl[I][logger:214]: Log initialized
[03:10:25][C][ota:461]: There have been 0 suspected unsuccessful boot attempts.
[03:10:25][I][app:029]: Running through setup()...
[03:10:25][C][spi:023]: Setting up SPI bus...
[03:10:25][C][st7735:236]: Setting up ST7735...
[03:10:25][D][st7735:248]:   START
[03:10:25][C][st7735:376]: ST7735
[03:10:25][C][st7735:376]:   Rotations: 0 °
[03:10:25][C][st7735:376]:   Dimensions: 128px x 160px
[03:10:25][C][st7735:377]:   Model: ST7735 GREENTAB
[03:10:25][C][st7735:378]:   CS Pin: GPIO15
[03:10:25][C][st7735:379]:   DC Pin: GPIO5
[03:10:25][D][st7735:381]:   Buffer Size: 20480
[03:10:25][D][st7735:382]:   Height: 160
[03:10:25][D][st7735:383]:   Width: 128
[03:10:25][D][st7735:384]:   ColStart: 0
[03:10:25][D][st7735:385]:   RowStart: 0
[03:10:25][C][st7735:386]:   Update Interval: 5.0s
[03:10:25][D][st7735:250]:   END
[03:10:26][C][wifi:037]: Setting up WiFi...
[03:10:26][D][wifi:373]: Starting scan...
[03:10:32][D][wifi:388]: Found networks:
[03:10:32][I][wifi:431]: - 'xxx' [redacted]▂▄▆█
[03:10:32][D][wifi:433]:     Channel: 6
[03:10:32][D][wifi:434]:     RSSI: -27 dB
[03:10:32][D][wifi:436]: - [redacted] [redacted]▂▄▆█
[03:10:32][D][wifi:436]: - [redacted] [redacted]▂▄▆█
[03:10:34][I][wifi:248]: WiFi Connecting to 'xxx'...
[03:10:36][I][wifi:505]: WiFi Connected!
[03:10:36][C][wifi:353]:   Local MAC:xxx
[03:10:36][C][wifi:354]:   SSID: [redacted]
[03:10:36][C][wifi:355]:   IP Address: 192.168.1.x
[03:10:36][C][wifi:356]:   BSSID: [redacted]
[03:10:36][C][wifi:358]:   Hostname: 'e8266'
[03:10:36][C][wifi:360]:   Signal strength: -33 dB ▂▄▆█
[03:10:36][C][wifi:364]:   Channel: 6
[03:10:36][D][wifi:514]: Disabling AP...
[03:10:36][C][ota:085]: Over-The-Air Updates:
[03:10:36][C][ota:086]:   Address: e8266.local:8266
[03:10:36][C][ota:089]:   Using Password.
[03:10:36][C][api:025]: Setting up Home Assistant API server...
[03:10:36][I][app:062]: setup() finished successfully!
[03:10:36][I][app:102]: ESPHome version 2022.2.5 compiled on Mar  2 2022, 03:10:12
[03:10:36][C][wifi:491]: WiFi:
[03:10:36][C][wifi:353]:   Local MAC: xxx
[03:10:36][C][wifi:354]:   SSID: [redacted]
[03:10:36][C][wifi:355]:   IP Address: 192.168.1.x
[03:10:36][C][wifi:356]:   BSSID: [redacted]
[03:10:36][C][wifi:358]:   Hostname: 'e8266'
[03:10:36][C][wifi:360]:   Signal strength: -33 dB ▂▄▆█
[03:10:36][C][wifi:364]:   Channel: 6
[03:10:36][C][logger:233]: Logger:
[03:10:36][C][logger:234]:   Level: DEBUG
[03:10:36][C][logger:235]:   Log Baud Rate: 115200
[03:10:36][C][logger:236]:   Hardware UART: UART0
[03:10:36][C][spi:097]: SPI bus:
[03:10:36][C][spi:098]:   CLK Pin: GPIO14
[03:10:36][C][spi:100]:   MOSI Pin: GPIO13
[03:10:36][C][spi:102]:   Using HW SPI: YES
[03:10:36][C][st7735:376]: ST7735
[03:10:36][C][st7735:376]:   Rotations: 0 °
[03:10:36][C][st7735:376]:   Dimensions: 128px x 160px
[03:10:36][C][st7735:377]:   Model: ST7735 GREENTAB
[03:10:36][C][st7735:378]:   CS Pin: GPIO15
[03:10:36][C][st7735:379]:   DC Pin: GPIO5
[03:10:36][D][st7735:381]:   Buffer Size: 20480
[03:10:36][D][st7735:382]:   Height: 160
[03:10:36][D][st7735:383]:   Width: 128
[03:10:36][D][st7735:384]:   ColStart: 2
[03:10:36][D][st7735:385]:   RowStart: 1
[03:10:36][C][st7735:386]:   Update Interval: 5.0s
[03:10:36][C][captive_portal:144]: Captive Portal:
[03:10:36][C][mdns:084]: mDNS:
[03:10:36][C][mdns:085]:   Hostname: e8266
[03:10:36][C][ota:085]: Over-The-Air Updates:
[03:10:36][C][ota:086]:   Address: e8266.local:8266
[03:10:36][C][ota:089]:   Using Password.
[03:10:36][C][api:138]: API Server:
[03:10:36][C][api:139]:   Address: e8266.local:6053
[03:10:36][C][api:143]:   Using noise encryption: NO

Additional information

No response

probot-esphome[bot] commented 2 years ago

Hey there @senexcrenshaw, mind taking a look at this issue as it has been labeled with an integration (st7735) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Lankaster commented 2 years ago

Display 1.77 TFT 160(RGB)x128. Wemos D1 mini pro. Work without problem:

Pins:

Display -> LOLIN 1:GND -> GND 2:VCC -> 3.3V 3:SCK -> GPIO14 4:SDA -> GPIO13 5:RES -> RST 6:RS -> GPIO2 7:CS -> GPIO15 8:LEDA -> 3.3V

Versions:

INFO Reading configuration lolin.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing lolin (board: d1_mini_pro; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 16MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|-- <ESPAsyncWebServer-esphome> 2.1.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|-- <SPI> 1.0
|-- <ArduinoJson> 6.18.5

Config:

spi:    # Use VSPI
  clk_pin: GPIO14
  mosi_pin: GPIO13
  miso_pin: GPIO12

display:
  - platform: st7735
    model: "INITR_18BLACKTAB"
    reset_pin: GPIO16
    cs_pin: GPIO15
    dc_pin: GPIO2
    rotation: 0
    device_width: 128
    device_height: 160
    col_start: 0
    row_start: 0
    eight_bit_color: true
    pages:
      - id: pageSignal
        lambda: |-
          if (id(wifisignal).has_state()) {
            it.printf(0, 75,id(roboto), "Signal: %.0f dB",id(wifisignal).state);
            it.printf(0, 95,id(roboto), "IP: %s",id(espip).state.c_str());
            it.printf(0, 115,id(roboto), "SSID: %s",id(espssid).state.c_str());
          }
          it.printf(0, 135,id(roboto), "Up: %s",id(uptime_human).state.c_str());
          it.print(0, 0, id(roboto), "Status");
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.