Search code examples
pythonspilcdraspberry-pi-zero

LCD displaying garbage on startup


I'm using a Raspberry Pi Zero wired to an Adafruit 1.14" 240 x 135 LCD (https://learn.adafruit.com/adafruit-1-14-240x135-color-tft-breakout?view=all) with a python application configured to run on startup. My problem is the LCD screen shows garbage data on startup, before diving into the application.

Here is a screenshot: https://i.sstatic.net/CFkfx.jpg

Using sleep statements, I found in my code the lines that trigger it:

disp = st7789.ST7789(spi, rotation=90, width=135, height=240, x_offset=53, y_offset=40, # 1.14" ST7789
    cs=cs_pin,
    dc=dc_pin,
    rst=reset_pin,
    baudrate=BAUDRATE,
)

Anybody know what's going on?


Solution

  • From https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/issues/84

    My solution was to turn off the backlight and enable it after initializing and blanking the display. It seemed simpler than digging down to the driver code.