TTGOT-Display에서 Micropython을 사용한 속편
5014 단어 TTGOmicropython
이번에는 ESP 32용 generic 농장을 사용하면서 ST7789의 운전자를 도입하는 수법을 사용했다.
generic 펌웨어 먼저 가져오기
여기서부터.
다운로드되었습니다.토니를 직접 사용해 농장을 업데이트했다.이런 느낌이에요.

그냥 thonny REPL에서 하면 제대로 썼는지 확인할 수 있어요.
ST7789 드라이버 및 글꼴 가져오기
다음은 클론입니다.
lib
폴더의 st7789py.py
를 TTGO로 복사합니다.글꼴 시작
fonts
, 디렉터리와 함께 TTGO로 복사합니다.시간이 필요하니 인내심을 가지고 기다려라.cd fonts/
ampy --port=/dev/cu.SLAB_USBtoUART put romfonts/
ampy --port=/dev/cu.SLAB_USBtoUART put truetype/
동작 확인실행해 보세요
examples/ttgo_tdisplay/truetype/noto_fonts.py
.
비트맵 샘플도 준비했어요.
hello_world.py
from machine import Pin, SoftSPI
import st7789py as st7789
from romfonts import vga2_16x32 as font
def main():
spi = SoftSPI(
baudrate=20000000,
polarity=1,
phase=0,
sck=Pin(18),
mosi=Pin(19),
miso=Pin(13))
tft = st7789.ST7789(
spi,
135,
240,
reset=Pin(23, Pin.OUT),
cs=Pin(5, Pin.OUT),
dc=Pin(16, Pin.OUT),
backlight=Pin(4, Pin.OUT),
rotation=1)
tft.text(
font,
"Hello world!",
0,0,
st7789.color565(255,255,255),
st7789.color565(0,0,0)
)
main()
주의 사항늦었지만...위의 샘플은 확실히'null'로 그릴 것이다.그렇겠지.
Reference
이 문제에 관하여(TTGOT-Display에서 Micropython을 사용한 속편), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/numeru55/items/003358ee3ae3e89e432f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)