def tick(): while True: date = strftime('%a') + " " + strftime('%x') LEDMatrix.scroll_message_horiz([date], 1, 5, DIR_L, TINY_FONT) sleep(1) cycle = 1 while cycle < 80: H = strftime('%H') M = strftime('%M') S = strftime('%S') LEDMatrix.static_message(H + M + S, DIR_RD, 0, TINY_FONT) cycle += 1 sleep(0.5)
def tick(): while True: date = strftime('%a') + " " + strftime('%x') LEDMatrix.scroll_message_horiz([date], 1, 5, DIR_L, TINY_FONT) sleep(1) cycle = 1 while cycle < 80: H = strftime('%H') M = strftime('%M') S = strftime('%S') LEDMatrix.static_message(H+M+S, DIR_RD, 0, TINY_FONT) cycle += 1 sleep(0.5)
def scroll(text, cycles=1, speed=5): speed = float(speed) LEDMatrix.scroll_message_horiz([text + " "], cycles, speed, DIR_L, TINY_FONT)
def scroll(text, cycles=1, speed=5): speed=float(speed) LEDMatrix.scroll_message_horiz([text + " "], cycles, speed, DIR_L, TINY_FONT)