# https://github.com/rdagger/micropython-ili9341
#--------------------------------------------------
# Module importieren
import machine
import time
import ili9341
#--------------------------------------------------
# setup
spi = machine.SPI(2, baudrate=40000000, sck=machine.Pin(18), mosi=machine.Pin(23), miso=machine.Pin(19))
tft = ili9341.Display(
spi,
cs=machine.Pin(15, machine.Pin.OUT),
dc=machine.Pin(4, machine.Pin.OUT),
rst=machine.Pin(2, machine.Pin.OUT),
width=240, height=320,
rotation=180
)
#--------------------------------------------------
# loop
while True:
# Text an Koordinate (x/y=30/90) ausgeben
tft.draw_text8x8(30, 90, "TFT-Display", ili9341.color565(255,0,0), ili9341.color565(0,0,0));
time.sleep(1)
# Display löschen
tft.clear(ili9341.color565(0, 0, 0))
time.sleep(1)