nyan cat animation

sammachin-gprs
Heinrich Mellmann 2018-09-02 20:20:03 +01:00
parent 42e2a5e9c2
commit d5998a9f06
13 changed files with 40 additions and 0 deletions

40
nyan/main.py Normal file
View File

@ -0,0 +1,40 @@
"""Nyan Cat Animation!"""
___name___ = "serendipity"
___license___ = "MIT"
___dependencies___ = ["sleep", "app", "ugfx_helper",
"shared/nyan/0.png",
"shared/nyan/1.png",
"shared/nyan/2.png",
"shared/nyan/3.png",
"shared/nyan/4.png",
"shared/nyan/5.png",
"shared/nyan/6.png",
"shared/nyan/7.png",
"shared/nyan/8.png",
"shared/nyan/9.png",
"shared/nyan/10.png",
"shared/nyan/11.png"]
___categories___ = ["EMF", "Other"]
import ugfx_helper, os, wifi, ugfx, http, time, sleep, app
from tilda import Buttons
# initialize screen
ugfx_helper.init()
ugfx.clear(ugfx.BLACK)
ugfx.backlight(100)
n = 0
while True:
ugfx.display_image( 0, 90, "shared/nyan/{}.png".format(n) )
n = (n+2) % 12
sleep.sleep_ms(10)
if Buttons.is_pressed(Buttons.BTN_B):
break
ugfx.clear()
app.restart_to_default()

BIN
shared/nyan/0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

BIN
shared/nyan/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

BIN
shared/nyan/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

BIN
shared/nyan/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
shared/nyan/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

BIN
shared/nyan/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

BIN
shared/nyan/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

BIN
shared/nyan/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
shared/nyan/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
shared/nyan/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

BIN
shared/nyan/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

BIN
shared/nyan/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B