pyST7920 icon indicating copy to clipboard operation
pyST7920 copied to clipboard

Samples

Open JarradFairborn opened this issue 6 years ago • 3 comments

I see your games but, do you have any simple examples of text output?

JarradFairborn avatar Apr 16 '18 00:04 JarradFairborn

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.

JMW95 avatar Apr 16 '18 18:04 JMW95

What does the redraw function do?

Shanki5 avatar Jun 24 '20 03:06 Shanki5

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.

JMW95 avatar Jun 24 '20 23:06 JMW95