Toggle Navigation
Hatchery
Eggs
c64
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import ugfx, badge, appglue #import deepsleep def paintff(): while True: pass def printerr(string): print("CPAP") ugfx.string(0, 0, string, "Roboto_Regular12", ugfx.BLACK) while True: pass def program_main(): print("--- GERAFFEL APP ---") ugfx.init() ugfx.set_lut(ugfx.LUT_FULL) ugfx.input_init() ugfx.input_attach(ugfx.JOY_UP, lambda pressed: printerr("crap app")) ugfx.input_attach(ugfx.JOY_DOWN, lambda pressed: paintff()) ugfx.input_attach(ugfx.JOY_LEFT, lambda pressed: paintff()) ugfx.input_attach(ugfx.JOY_RIGHT, lambda pressed: paintff()) ugfx.input_attach(ugfx.BTN_A, lambda pressed: paintff()) ugfx.input_attach(ugfx.BTN_B, lambda pressed: paintff()) ugfx.input_attach(ugfx.BTN_SELECT, lambda pressed: paintff()) ugfx.input_attach(ugfx.BTN_START, lambda pressed: paintff()) ugfx.input_attach(ugfx.BTN_FLASH, lambda pressed: appglue.start_app("")) try: badge.eink_png(0,0,'/lib/c64/c64.png') except: ugfx.string(0, 0, "C64 LOAD ERROR geraffel.png", "Roboto_Regular12", ugfx.BLACK) ugfx.flush() badge.eink_busy_wait() while True: #deepsleep.start_sleeping(24*3600*1000) pass #appglue.start_app("") # Return home # Start main application program_main()