Toggle Navigation
Hatchery
Eggs
nyancat
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
# NYANCAT APPLICATION # SHOWN ONCE AFTER SETUP import ugfx, badge, appglue, deepsleep def program_main(): print("--- NYANCAT APP ---") ugfx.init() ugfx.set_lut(ugfx.LUT_FULL) badge.leds_init() badge.leds_send_data(bytes([51, 102, 255, 0, 153, 0, 255, 0, 255, 51, 0, 0, 255, 255, 0, 0, 153, 255, 0, 0, 0, 255, 0, 0]), 24) try: badge.eink_png(0,0,'/lib/nyancat/nyancat.png') except: ugfx.string(0, 0, "NYANCAT LOAD ERROR nyancat.png", "Roboto_Regular12", ugfx.BLACK) ugfx.flush() badge.eink_busy_wait() deepsleep.start_sleeping(5000) appglue.start_app("") # Return home # Start main application program_main()