from ST7735 import TFT from sysfont import sysfont from machine import SPI,Pin import time, math # ESP32 D1 R32 --- TFT: Pins SCK/orange SDA/gelb MISO frei spi = SPI(2, baudrate=20000000, polarity=0, phase=0, sck=Pin(14), mosi=Pin(13), miso=Pin(12)) # TFT RES, RS, CS # green violett grey tft=TFT(spi, 16, 17, 18) tft.initr() tft.rgb(True) tft.fill(TFT.BLACK) tft.rotation(1) # Pinleiste ist rechts tft.text((10,20), " Young", TFT.WHITE, sysfont, 2) tft.text((20, 40), "Engineers", TFT.RED, sysfont, 2, nowrap=True) tft.line((0,0),(tft.size()[0]-1, tft.size()[1] - 1), TFT.BLUE) tft.hline((0,0), tft.size()[0], TFT.RED) tft.vline((0,0), tft.size()[1], TFT.GREEN) time.sleep(1) tft.fillrect((10, 5), (20, 10), TFT.GREEN) tft.rect((90, 80), (30, 40), TFT.WHITE) tft.circle((140, 30), 20, TFT.YELLOW) tft.fillcircle((30, 100), 25, TFT.RED)