I want to see If I can connect a simple TFT display to my board to view my sensor distance readings, rather than having to use the ESPHome log viewer or Home Assistant dashboard.
I’m still very new to all things electrical and have been reading the ESPHome ‘Display’ component info here: Display Component — ESPHome
To keep things simple I’ve unplugged my ultrasonic sensor from my board and removed the code for it in my ESPHome config file, so that I can just test the display and the display code by itself, before trying to get my sensor readings to display.
I’ve fallen at the first hurdle and don’t know if its a problem with the GPIO pins I’ve assigned, a hardware issue with the display, or the ESPHome driver.
Board: Lolin D1 Mini Pro (ESP8266) - Powered via USB
Display: Waveshare 0.96" TFT 160 x 80 SPI ST7735S Controller
Display VCC → Board 3.3v
Display GND → Board GND
Display DIN → Board MOSI GPIO13
Display CLK → Board SCK GPIO14
Display CS → Board SS GPIO15
Display DC → Board GPIO0
Display RST → Board GPIO2
Display BL → N.C
esphome: name: display esp8266: board: d1_mini_pro spi: clk_pin: GPIO14 mosi_pin: GPIO13 display: - platform: st7735 model: "INITR_MINI160X80" reset_pin: GPIO2 cs_pin: GPIO15 dc_pin: GPIO0 rotation: 0 device_width: 160 device_height: 80 col_start: 0 row_start: 0 eight_bit_color: true update_interval: 5s lambda: |- it.line(0, 0, 50, 50);
The above config compiles and uploads to my board fine, however the display isn’t working correctly.
The first half of the display from left to right is white, however the right half of the screen is showing multicoloured ‘white noise’ - sorry , the best I can describe it!
My black line code does render as a diagonal line, but not in the top left corner of the screen as expected. Imagining the screen from left to right divided into 4 quarters, my line starts in the top left of the second quarter of the screen. It ALSO replicates underneath this. Imagining the screen divided into 2 halves, top and bottom, the top half replicates on the bottom half.
I know that my display uses the ST7735S controller, and I am referencing the ESPHome native support for the ST7735 controller, so first thoughts, after checking my wiring/connections are ok, is this difference is causing the incompatibility?
A couple of picture to illustrate the problem better than my words:
Any help appreciated