def show_temp(): yahoo_weather = pywapi.get_weather_from_yahoo('78728', 'imperial') for ch in yahoo_weather['condition']['temp']: display.display_char_fade(ch, color_tools.random_rgb(), 300) display.display_char_fade(chr(0xb0), color_tools.random_rgb(), 300) display.display_char_fade('f', color_tools.random_rgb(), 300) time.sleep(0.4)
def show_clock(): time_now = datetime.datetime.now().time() hour = time_now.hour if time_now.hour <= 12 else time_now.hour - 12 color = display.palette[[0, 1, 4, 6][time_now.minute / 15]] display.display_char_fade(str(hour), color, 600)