import uPyConfig hw = uPyConfig.esp32() import webrepl webrepl.start() #print family, variant and IP address (using oled, if available on-board) import init_sample init_sample.PrintHWInfo(hw) # Main app from machine import Pin, TouchPad, SPI #from uPaper import epaper, fbuf from ST7735 import TFT from time import sleep_ms tft_spibus=2 tft_mosi=Pin(23) tft_sck=Pin(5) tft_dc=17 tft_rst=12 tft_cs=16 spi=SPI(tft_spibus,baudrate=20000000,polarity=0,phase=0,mosi=tft_mosi,sck=tft_sck) tft=TFT(spi,tft_dc,tft_rst,tft_cs) tft.on() tft.initg() tft.initb() tft.rgb(True) tft.initr() sleep_ms(200) tft.fill(tft.RED) sleep_ms(40) tft.fill(tft.BLUE) sleep_ms(40) tft.fill(tft.GREEN) sleep_ms(40) tft.fill(tft.PURPLE) sleep_ms(40) tft.fill(tft.WHITE) sleep_ms(800) from fonts import terminal from network import WLAN as wlan, STA_IF as staif tft.text((4,6),hw.family,tft.BLACK,terminal.data) tft.text((4,16),hw.variant,tft.BLACK,terminal.data) tft.text((4,26),wlan(staif).ifconfig()[0],tft.BLACK,terminal.data)