pyST7920
pyST7920 copied to clipboard
Samples
I see your games but, do you have any simple examples of text output?
The most basic example of text output would be something like this:
from st7920 import ST7920
s = ST7920()
s.clear()
s.put_text("Hello world!", 5, 10)
s.redraw()
The ST7920.put_text method accepts 3 parameters: text to display, x position and y position.
What does the redraw function do?
The redraw
function displays the drawn image on the screen. The other methods in this library draw to a framebuffer in memory for speed, and once all drawing is complete you call redraw
to push the image to the screen.