コード例 #1
0
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)
コード例 #2
0
ファイル: clock.py プロジェクト: JBarrada/7seg
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)
コード例 #3
0
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)
コード例 #4
0
ファイル: clock.py プロジェクト: JBarrada/7seg
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)