import board
import busio
import displayio
import terminalio
from adafruit_display_text import label
from adafruit_ili9341 import ILI9341
from adafruit_display_shapes.rect import Rect
from adafruit_display_shapes.circle import Circle
from adafruit_display_shapes.roundrect import RoundRect
from adafruit_display_shapes.triangle import Triangle
from adafruit_display_shapes.line import Line
spi = busio.SPI(clock=board.GP14, MOSI=board.GP15)
tft_cs = board.GP17
tft_dc = board.GP6
tft_rst = board.GP7
display_bus = displayio.FourWire(
spi,
command=tft_dc,
chip_select=tft_cs,
reset=tft_rst
)
print("FourWire bus initialized.")
display = ILI9341(display_bus, width=320, height=240, rotation=90)
Screen_5 = displayio.Group()
display.root_group = Screen_5
image_cards_clubs_copy_1_bits = bytearray(b'\x00\x0f\xc0\x00\x00\x0f\xc0\x00\x00?\xf0\x00\x00?\xf0\x00\x00\xff\xfc\x00\x00\xff\xfc\x00\x00\xff\xfc\x00\x00\xff\xfc\x00\x00\xff\xfc\x00\x00\xff\xfc\x00\x00?\xf0\x00\x00?\xf0\x00\x0f\xcf\xcf\xc0\x0f\xcf\xcf\xc0?\xff\xff\xf0?\xff\xff\xf0\xff\xff\xff\xfc\xff\xff\xff\xfc\xff\xff\xff\xfc\xff\xff\xff\xfc\xff\xff\xff\xfc\xff\xff\xff\xfc\xff\xfc\xff\xfc\xff\xfc\xff\xfc?\xf3?\xf0?\xf3?\xf0\x0f\xc3\x0f\xc0\x0f\xc3\x0f\xc0\x00\x0f\xc0\x00\x00\x0f\xc0\x00\x00?\xf0\x00\x00?\xf0\x00')
cards_clubs_copy_1_y = 26
Layer_1_copy_1_color = 0x2196f3
Layer_1_copy_2_x2 = 67
Layer_1_copy_3_radius = 36
def draw_Layer_1_copy_1():
Screen_5.append(Line(33, 24, 4, 58, color=Layer_1_copy_1_color))
Screen_5.append(Line(4, 58, 30, 103, color=Layer_1_copy_1_color))
Screen_5.append(Line(30, 103, 85, 108, color=Layer_1_copy_1_color))
Screen_5.append(Line(85, 108, 107, 82, color=Layer_1_copy_1_color))
Screen_5.append(Line(107, 82, 106, 36, color=Layer_1_copy_1_color))
Screen_5.append(Line(106, 36, 56, 77, color=Layer_1_copy_1_color))
Screen_5.append(Line(56, 77, 33, 24, color=Layer_1_copy_1_color))
def drawScreen_5():
# Layer 1 copy 1
draw_Layer_1_copy_1()
# Layer 1 copy 2
Layer_1_copy_2 = Triangle(18, 13, Layer_1_copy_2_x2, 27, 54, 105, fill=0xFFFFFF, outline=0xFFFFFF)
Screen_5.append(Layer_1_copy_2)
# Layer 1 copy 3
Layer_1_copy_3 = Circle(85, 49, Layer_1_copy_3_radius, fill=0xe91e63, outline=0xe91e63)
Screen_5.append(Layer_1_copy_3)
# Layer 1 copy 4
Layer_1_copy_4 = RoundRect(62, 66, 60, 54, 2, outline=0x009688)
Screen_5.append(Layer_1_copy_4)
# cards_clubs copy 1
# cards_clubs_copy_1_bitmap = displayio.OnDiskBitmap("/cards_clubs_copy_1.bmp")
# cards_clubs_copy_1_tile = displayio.TileGrid(cards_clubs_copy_1_bitmap, pixel_shader=cards_clubs_copy_1_bitmap.pixel_shader, position=(67, cards_clubs_copy_1_y))
# Screen_5.append(cards_clubs_copy_1_tile)
while True:
drawScreen_5()