From 47c8f654c36ec162a5922d398315863109664788 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 2 Sep 2021 15:36:39 -0700 Subject: [PATCH 1/2] Fix the 280x240 example offsets --- examples/st7789_280x240_simpletest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/st7789_280x240_simpletest.py b/examples/st7789_280x240_simpletest.py index 3fac5aa..59ba1e3 100644 --- a/examples/st7789_280x240_simpletest.py +++ b/examples/st7789_280x240_simpletest.py @@ -15,20 +15,20 @@ displayio.release_displays() spi = board.SPI() -tft_cs = board.D5 -tft_dc = board.D6 +tft_cs = board.D10 +tft_dc = board.D8 display_bus = displayio.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=board.D9 ) -display = ST7789(display_bus, width=320, height=240, rotation=90) +display = ST7789(display_bus, width=280, height=240, rowstart=20, rotation=90) # Make the display context splash = displayio.Group() display.show(splash) -color_bitmap = displayio.Bitmap(320, 240, 1) +color_bitmap = displayio.Bitmap(280, 240, 1) color_palette = displayio.Palette(1) color_palette[0] = 0x00FF00 # Bright Green @@ -36,14 +36,14 @@ splash.append(bg_sprite) # Draw a smaller inner rectangle -inner_bitmap = displayio.Bitmap(280, 200, 1) +inner_bitmap = displayio.Bitmap(240, 200, 1) inner_palette = displayio.Palette(1) inner_palette[0] = 0xAA0088 # Purple inner_sprite = displayio.TileGrid(inner_bitmap, pixel_shader=inner_palette, x=20, y=20) splash.append(inner_sprite) # Draw a label -text_group = displayio.Group(scale=3, x=57, y=120) +text_group = displayio.Group(scale=3, x=37, y=120) text = "Hello World!" text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00) text_group.append(text_area) # Subgroup for text scaling From 9d05143aa60166e66ef869721f8b2c7444ebe4bb Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 2 Sep 2021 15:37:38 -0700 Subject: [PATCH 2/2] Set back to feather pins --- examples/st7789_280x240_simpletest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/st7789_280x240_simpletest.py b/examples/st7789_280x240_simpletest.py index 59ba1e3..926990d 100644 --- a/examples/st7789_280x240_simpletest.py +++ b/examples/st7789_280x240_simpletest.py @@ -15,8 +15,8 @@ displayio.release_displays() spi = board.SPI() -tft_cs = board.D10 -tft_dc = board.D8 +tft_cs = board.D5 +tft_dc = board.D6 display_bus = displayio.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=board.D9