esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
404 stars 26 forks source link

Support for Sitronix ST7735S TFT Controller/Driver (Waveshare 0.96" SPI TFT Display) #1730

Open Scoff123 opened 2 years ago

Scoff123 commented 2 years ago

Describe the problem you have/What new integration you would like I have a Waveshare 0.96" 80x160 TFT SPI Display which uses the ST7735S controller. The screen protector film has a Blue tab. This display is connected to my Lolin D1 Mini Pro ESP8266 board. Configuring my ESPHome code to use the ST7735 platform doesn't work correctly with my ST7735S Blue tab display. There is no Blue tab option to specify in the code, so I am using the model INITR_MINI160X80 Using default settings, the resulting display does not fill the screen, and there are borders of undriven screen. To drive these borders and fill the screen, I have to set the width as 82, and height as 161.

Also, the RGB colours are either inverted or not mapped correctly. For example, if I try to fill the screen with RED only, I define:

color:
  - id: my_red
    red: 100%
    green: 100%
    blue: 100%

and create a display lambda

lambda: |- it.fill(id(my_red));

however the result is a YELLOW screen.

If I create

color
- id: my_white
  red: 100%
  green: 100%
  blue: 100%

the result is a BLACK screen.

If I create

color
- id: my_black
  red: 0%
  green: 0%
  blue: 0%

the result is a WHITE screen.

Please describe your use case for this integration and alternatives you've tried: I am using this display to show a visual readout of an ultrasonic sensor distance reading. I have erased my ESPHome config from my board and installed Arduino instead, and used the Demo code provided by the manufacturer, and the display works correctly.

If support for this display can be added, It could either be a new supported platform ST7735S, or alternatively added to the existing ST7735 platform as a configurable veriable? https://esphome.io/components/display/st7735.html

Additional context Details of this display can be found here, including Datasheet and Demo codes for Arduino, Rasp Pi, STM32:

https://www.waveshare.com/product/displays/lcd-oled/lcd-oled-3/0.96inch-lcd-module.htm https://www.waveshare.com/wiki/0.96inch_LCD_Module https://www.waveshare.com/wiki/File:0.96inch_LCD_Module_code.7z

yuezhongtao commented 2 months ago

Is this problem not solved yet in the esphome2023.3.2 version?

nielsnl68 commented 2 months ago

@yuezhongtao do you have still the issues like with above report?

yuezhongtao commented 2 months ago

@yuezhongtao do you have still the issues like with above report?

problem has been solved

nielsnl68 commented 2 months ago

Thanks for reporting back, Can you close this issue then :D

Scoff123 commented 2 months ago

Was this fixed in an esphome update? I've tried to keep a look out in the esphkme update release notes, but didn't spot anything, and given the lack of response on here I didn't think anything had been done to support this display.