本站改版新增arduino频道
micropython esp32s3 ili9488电容触摸屏
接线表:
# dc 37
# sck 36
# mosi 35
# led 7
# rst 5
# cs 4


"""ILI9488 demo (fonts)."""
from time import sleep
from ili9488 import Display, color565
from machine import Pin, SPI
from xglcd_font import XglcdFont
import random
# dc 37
# sck 36
# mosi 35
# led 7
# rst 5
# cs 4
def test():
"""Test code."""
# Baud rate of 60000000 seems about the max
spi = SPI(2, baudrate=60000000, sck=Pin(36), mosi=Pin(35))
display = Display(spi, dc=Pin(37), cs=Pin(4), rst=Pin(5),width = 480, height = 320)
print('Loading fonts...')
print('Loading arcadepix')
arcadepix = XglcdFont('fonts/ArcadePix9x11.c', 9, 11)
print('Loading bally')
bally = XglcdFont('fonts/Bally7x9.c', 7, 9)
for i in range(0,60):
display.draw_text(random.randint(0,320), random.randint(0,480), 'This''s a small test!', arcadepix, color565(random.randint(0,255), random.randint(0,255), random.randint(0,255)))
display.draw_text(random.randint(0,320), random.randint(0,480), 'Bally 7x9', bally, color565(random.randint(0,255), random.randint(0,255), random.randint(0,255)))
#for i in range(480):
# display.draw_pixel(160, i, color565(255, 0, 0))
test()
[MicroPython Ports] 的 ILI9488 TFT 驱动程序
https://github.com/QiaoTuCodes/MicroPython-_ILI9488
Copyright © 2014 ESP56.com All Rights Reserved
晋ICP备14006235号-22 晋公网安备14108102001165号
执行时间: 0.010067939758301 seconds