russhughes / st7789_mpy

Fast MicroPython driver for ST7789 display module written in C
Other
554 stars 110 forks source link

No display output on a 128x160 1.8" Color TFT LCD display with MicroSD Card Breakout - ST7735R from Adafruit with the firmware.uf2 running on a pico h #120

Open Patcybermind opened 1 year ago

Patcybermind commented 1 year ago

Hello, I've been trying to get the screen to display something other than black and white for 2 days now I've read previous issues but nothing seems to work maybe I'm missing something obvious, the sprig is connected on a custom PCB this is the screen https://www.adafruit.com/product/358 this is the PCB image i did not make the PCB (its a PCB made for the sprig console but nothing is soldered, you build it yourself and it has connectors) so maybe I'm missing something completely obvious also yes the screen does work, it works with the OS made for it

can someone or some people please help me

I don't know what to do, i also tried using kaluma and using a library made for the display but it doesn't work either

Here is the code I'm currently at, I've tried changing lots of stuff but it didn't change anything :

from machine import Pin, SPI
import st7789

def config(rotation=0, buffer_size=0, options=0):
    return st7789.ST7789(
        SPI(0, baudrate=62500000, polarity=1, sck=Pin(18), mosi=Pin(19), miso=Pin(16)),
        128,
        160,
        reset=Pin(26, Pin.OUT),
        dc=Pin(22, Pin.OUT),
        rotation=rotation,
        options=options,
        buffer_size=buffer_size
        )

tft = config()

tft.init()

tft.fill(st7789.RED)

print("  working...")

print("  done")

it runs without errors (the previous errors are from before(i tried to change stuff)) and it does finish running

any help is appreciated -thanks

nspsck commented 1 year ago

Hi, this might be very late to respond.. but, it looks like you have not specified the backlight pin.

And well, if your display still turns on without specifing the backlight pin, you probably have a display that will light up when the pin is pulled down. And this driver will not work for displays such. You can try my modded version of this driver in that case: https://github.com/nspsck/st7735s_WeAct_Studio_TFT_port