def finalise(): event.remove_timer_handler(titlebar) # Badge: read config from file (default all) # on init set message handlers to monitor lca/schedule/<room> as configured # when handler fires, display on screen
def run(period=50): oled.oleds_clear(0) new_eyes() display_eyes() event.add_timer_handler(timer_handler, period) try: event.loop() finally: event.remove_timer_handler(timer_handler)
def run(period=50): oled.title = "Snake 0.0" oled.oleds_clear(0) snake_new() display_snake() event.add_timer_handler(timer_handler, period) try: event.loop() finally: event.remove_timer_handler(timer_handler)
def run(handler=snoot_boop_handler, period=100): event.add_timer_handler(handler, period) try: event.loop() finally: event.remove_timer_handler(handler)
def run(handler=hall_sensor_handler, period=100): event.add_timer_handler(handler, period) try: event.loop() finally: event.remove_timer_handler(handler)
def finalise(): event.remove_timer_handler(titlebar)