from machine import Pin, SPI
import time
import st7789py as st7789 # your .py driver
# ILI9341 in Wokwi wants SPI mode 0
spi = SPI(1, baudrate=30_000_000, polarity=0, phase=0, sck=Pin(14), mosi=Pin(15))
# Use landscape 320x240. (You can also pass 240x320 with rotation=1; both are fine.)
tft = st7789.ST7789(
spi,
240, 320,
reset=Pin(16, Pin.OUT),
dc=Pin(17, Pin.OUT),
cs=Pin(5, Pin.OUT),
rotation=0, # or rotation=1 with (240,320)
color_order=st7789.BGR # start with RGB for the ILI9341 stand-in
)
tft.text("Richie OS", 0, 0, st7789.BLUE)