Skip to content

Program not showing display but working with no errors in console #9223

@anonfaded

Description

@anonfaded

CircuitPython version

Adafruit CircuitPython 9.0.4 on 2024-04-16; Raspberry Pi Pico with rp2040
Board ID:raspberry_pi_pico

Code/REPL

# Raspberry Pi Pico

import board,busio
from time import sleep
from adafruit_st7735r import ST7735R
import displayio
import terminalio
from adafruit_display_text import label

mosi_pin = board.GP11
clk_pin = board.GP10
reset_pin = board.GP17
cs_pin = board.GP18
dc_pin = board.GP16

displayio.release_displays()

spi = busio.SPI(clock=clk_pin, MOSI=mosi_pin)

display_bus = displayio.FourWire(spi, command=dc_pin, chip_select=cs_pin, reset=reset_pin)

display = ST7735R(display_bus, width=128, height=160, bgr = True)

splash = displayio.Group()
display.root_groun = splash

color_bitmap = displayio.Bitmap(128, 160, 1)

color_palette = displayio.Palette(1)
color_palette[0] = 0x00FF00  # Bright Green

bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0)
splash.append(bg_sprite)

# Draw a smaller inner rectangle
inner_bitmap = displayio.Bitmap(118, 150, 1)
inner_palette = displayio.Palette(1)
inner_palette[0] = 0x000000  # Black
inner_sprite = displayio.TileGrid(inner_bitmap, pixel_shader=inner_palette, x=5, y=5)
splash.append(inner_sprite)

# Draw a label
text_group = displayio.Group(scale=1, x=11, y=24)
text = "Hello World!\n\nThis is a sample\ntext!\n\nEverything is \nworking fine."
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFFFF)
text_group.append(text_area)  # Subgroup for text scaling
splash.append(text_group)

while True:
    pass

Behavior

%Run -c $EDITOR_CONTENT

Description

  • I am using raspberry pi pico 16mb flash, i followed this tutorial from youtube and all steps were done right, pins etc everything is connected with the board and lcd module.
  • I am using SPI TFT 1.8inch lcd module.
  • The lcd is just white from start even before flash and now when i run that program to show some sample text on screen, it shows nothing and still its white, while in tutorial his same lcd was working fine.
  • The shell in Thonny IDE is also not showing any error and the program is running there, when i stop the screen is still white and i see no solution for this.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions