Skip to content

Commit c86935f

Browse files
authored
Merge pull request #2 from makermelissa/master
Fixed TFT Gizmo Demo to actually use gizmo library
2 parents 492da11 + c155ab8 commit c86935f

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

examples/gizmo_tft_demo.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,13 @@
22
This test will initialize the display using displayio and draw a solid green
33
background, a smaller purple rectangle, and some yellow text.
44
"""
5-
import board
6-
import busio
75
import displayio
86
import terminalio
97
from adafruit_display_text import label
10-
from adafruit_st7789 import ST7789
8+
from adafruit_gizmo import tft_gizmo
119

12-
# Release any resources currently in use for the displays
13-
displayio.release_displays()
14-
15-
spi = busio.SPI(board.SCL, MOSI=board.SDA)
16-
tft_cs = board.RX
17-
tft_dc = board.TX
18-
tft_backlight = board.A3
19-
20-
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)
21-
22-
display = ST7789(display_bus, width=240, height=240, rowstart=80,
23-
backlight_pin=tft_backlight, rotation=180)
10+
# Create the TFT Gizmo display
11+
display = tft_gizmo.TFT_Gizmo()
2412

2513
# Make the display context
2614
splash = displayio.Group(max_size=10)

0 commit comments

Comments
 (0)