wasp: Turn-key demo
Press ^C to terminate the demo and start programming in python!
This commit is contained in:
parent
3157bcc310
commit
06b8730af8
2 changed files with 29 additions and 0 deletions
27
wasp/demo.py
Normal file
27
wasp/demo.py
Normal file
|
@ -0,0 +1,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)
|
||||||
|
|
2
wasp/main.py
Normal file
2
wasp/main.py
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import demo
|
||||||
|
demo.run()
|
Loading…
Reference in a new issue