summaryrefslogtreecommitdiff
path: root/wasp/demo.py
blob: b8477dbe6e544e91eff9bbeb55e182a4583c3d89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Simple alternating logo demo

import pinetime, logo, time

def run():
    colors = (
            0xffff,
            0xf800, # red
            0xffff,
            0xffe0, # yellow
            0xffff,
            0x07e0, # green
            0xffff,
            0x07ff, # cyan
            0xffff,
            0x001f, # blue
            0xffff,
            0xf81f, # magenta
            )

    tft = pinetime.st7789()

    while True:
        for c in colors:
            tft.rleblit(logo.sx, logo.sy, logo.image, fg=c)
            time.sleep(2)