Open Aadniz opened 5 years ago
I would use a custom character. See custom_char()
.
Print the custom character to the desired position on the screen, then update the character definition in CGRAM and it will update on the display without having to re-write the character again and again.
There are 8 custom characters, so you can have 8 different independent animations.
eg. box that moves from corner to corner:
box0 = bytearray([0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00]))
box1 = bytearray([0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00]))
box2 = bytearray([0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00]))
box3 = bytearray([0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00]))
box4 = bytearray([0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x00]))
box5 = bytearray([0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07]))
box6 = bytearray([0x00,0x00,0x00,0x00,0x00,0x0E,0x0E,0x0E]))
box7 = bytearray([0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C]))
box8 = bytearray([0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00]))
box9 = bytearray([0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00]))
box10 = bytearray([0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00]))
box11 = bytearray([0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00]))
box12 = bytearray([0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,0x00]))
box13 = bytearray([0x0E,0x0E,0x0E,0x00,0x00,0x00,0x00,0x00]))
Hi.
I'm simply trying to create a spinning line effect with these symbols:
| / - \
I saw in the docs that it was a few exceptions
This is the code I'm using:
Are there any ways to print a backslash?