Pirate Audio Display error

Maybe someone can help me I bought Pimoroni Pirate Audio hat a year ago and a couple of times tried and it worked. then it was lying a year and I tried again to install different programs but all the time the display badly worked only showed stripes as in the picture. may someone know what the problem may be or what is broken and what to change

Have you started over with a fresh PiOS image?
If no I would.
If yes do any of the examples like rainbow.py work?

same issue but in color

Kind of looks like its broken?
Make sure its firmly attached to the GPIO, and plugged in correctly.
Also make sure nothing on the Pi, like a heatsink, is touching the backside of the Pirate Audio board.

maybe it is broken, but I don’t know how to check it. It doesn’t touch anything and plugged correctly. I test it on two raspberrys with the same result.

I have several of the 0.96 160 x 80 LCD breakouts and one of the 1.3 240 x 240 LCD breakouts. The 1.3 240 x 240 is the same screen used in the Pirate Audio.
I test all of them with the scrolling-text.py example.
I edited this one to work on the Pirate Audio screen.

from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
import time

import ST7789


MESSAGE = "Hello World! How are you today?"

# Create ST7789 LCD display class.
st7789 = ST7789(
    rotation=90,  # Needed to display the right way up on Pirate Audio
    port=0,       # SPI port
    cs=1,         # SPI port Chip-select channel
    dc=9,         # BCM pin used for data/command
    backlight=13,
    spi_speed_hz=SPI_SPEED_MHZ * 1000 * 1000
)

# Initialize display.
disp.begin()

WIDTH = disp.width
HEIGHT = disp.height


img = Image.new('RGB', (WIDTH, HEIGHT), color=(0, 0, 0))

draw = ImageDraw.Draw(img)

font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 30)

size_x, size_y = draw.textsize(MESSAGE, font)

text_x = disp.width
text_y = (80 - size_y) // 2

t_start = time.time()

while True:
    x = (time.time() - t_start) * 100
    x %= (size_x + disp.width)
    draw.rectangle((0, 0, disp.width, 80), (0, 0, 0))
    draw.text((int(text_x - x), text_y), MESSAGE, font=font, fill=(255, 255, 255))
    disp.display(img)

your code is not working for me but this one yes https://raw.githubusercontent.com/pimoroni/st7789-python/fa6195dcb7d12e3969f047ce2b71b2a5b3ee417c/examples/scrolling-text.py

but nothing has worked properly

That’s the file I “modified” to work on a Pirate Audio. It’s written for the Breakout garden which uses different pins for the display than the Pirate Audio does. I must have made a clip and past error?
Either way I think your display has failed.