rotations.py

../_images/rotations.png

Shows the effect of each of the 8 rotation values on the display.

 1"""
 2rotations.py
 3============
 4
 5.. figure:: /_static/rotations.png
 6  :align: center
 7
 8  Shows the effect of each of the 8 rotation values on the display.
 9"""
10
11import utime
12import gc9a01
13import tft_config
14import vga1_bold_16x32 as font
15
16
17def main():
18    tft = tft_config.config(tft_config.TALL)
19
20    tft.init()
21    tft.fill(gc9a01.BLACK)
22    utime.sleep(1)
23
24    while True:
25        for rot in range(8):
26            tft.fill(gc9a01.BLACK)
27            tft.rotation(rot)
28            s = f"Rotation {rot}"
29            tft.text(font, s, 40, 104, gc9a01.WHITE)
30            utime.sleep(2)
31
32
33main()