Slide 57
Slide 57 text
while True:
if update:
lcd.clear()
lcd.message('Please Wait\nFetching Data')
json = API.getLocation(locations.get(str(location) + 's'), locations.get(str(location) + 'c'),
token)
update = False
display = 0
if display == 0:
lcd.clear()
high = API.high(json, units_Temp)
low = API.low(json, units_Temp)
windSpeed = API.windSpeed(json, units_Speed)
windDir = API.winDir(json)
string1 = API.Display1(high, low, windSpeed, units_Speed, windDir, language)
lcd.message(string1)
if display == 1:
lcd.clear()
rain = API.rain(json)
humidity = API.humidity(json)
string2 = API.Display2(rain, humidity, language)
lcd.message(string2)
if display == 2:
lcd.clear()
lcd.message('More Data\nComing Soon!')
Main.py