示例#1
0
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
示例#2
0
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)
示例#3
0
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)
示例#4
0
def run(handler=snoot_boop_handler, period=100):
    event.add_timer_handler(handler, period)
    try:
        event.loop()
    finally:
        event.remove_timer_handler(handler)
示例#5
0
def run(handler=hall_sensor_handler, period=100):
    event.add_timer_handler(handler, period)
    try:
        event.loop()
    finally:
        event.remove_timer_handler(handler)
示例#6
0
def finalise():
    event.remove_timer_handler(titlebar)