def main(): while True: lcd.clear_LCD() outTup = pollingFunction() retArr = parseEvents(outTup[0], outTup[1]) disp_loop(retArr) sleeper.sleep(sleep_time) lcd.clear_LCD() outWeather = weather_report() lcd.write_to_LCD(outWeather['status'], outWeather['temp']) sleeper.sleep(sleep_time)
def disp_loop(arr): for item in arr: lcd.write_to_LCD(item[0][11:19], item[1]) sleeper.sleep(5)