LIBtft144
LIBtft144 copied to clipboard
put_string draws unnecessary characters?
I've written some code which simulates bouncing text from the wall to wall:
txt = "TEST"
width=len(txt) * 8
height=12
posx=posy=0
xmod=ymod=1
while True:
posx += xmod
posy += ymod
TFT.put_string(txt, posx, posy, TFT.WHITE, TFT.BLACK, 5)
if posx + width == 127:
xmod = -1
if posy + height == 127:
ymod = -1
if posx == 0:
xmod = 1
if posy == 0:
ymod = 1
sleep(0.005)
The result is as on the video: https://youtu.be/is2KnqieLdQ