Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

Graphics, sound and multimedia • TFT display 160x128px 1,8 inch white screen

$
0
0
Hi i need help with rpi zero 2 w with tft diplay correct connected wires but not work i see still white screen what with this ? thank you :)

Code:

  GNU nano 8.4                                                                                                      st7735_luma_test.py                                                                                                               from luma.core.interface.serial import spifrom luma.lcd.device import st7735from PIL import Image, ImageDrawimport timeserial = spi(    port=0,    device=0,          # CS pin 24 = CE0 = spidev0.0    gpio_DC=25,        # RS/DC pin 22    gpio_RST=24,       # RST pin 18    bus_speed_hz=24000000)device = st7735(    serial,    width=160,    height=128,    rotate=1)W, H = device.width, device.heightimg = Image.new("RGB", (W, H), "black")draw = ImageDraw.Draw(img)draw.rectangle((0, 0, W-1, H//3), fill="red")draw.rectangle((0, H//3, W-1, 2*H//3), fill="green")draw.rectangle((0, 2*H//3, W-1, H-1), fill="blue")draw.text((5, 5), "ST7735 OK", fill="white")device.display(img)time.sleep(10)

Statistics: Posted by stromecek555 — Tue Jan 20, 2026 3:26 pm — Replies 2 — Views 55



Viewing all articles
Browse latest Browse all 7503

Trending Articles