All the methods I have used either makes everything being displayed flash constantly or I clear the screen completely for 5 min until next cycle. I am looking for a way to only change the temperature not the rest of what is being displayed.
Code: Select all
#wait 1 minute
time.sleep( 300 )
openWeather()
while True:
#while variables
Degree = chr(176)
removeM = time.strftime('%p').strip('M') #removes M from AM or PM
currentTemp = str(openWeather())
useTemp = 0
if str(openWeather()) != useTemp:
mylcd.lcd_clear()
useTemp = str(openWeather())
#displays date in Hour:Minute:AM/PM Month/Day/Year
mylcd.lcd_display_string(time.strftime("%I:%M" + removeM + " %m/%d/%y " + useTemp +Degree), 1)
mylcd.lcd_display_string(time.strftime(''), 2)
mylcd.lcd_display_string(time.strftime("LAN= " + myIp()), 3)
mylcd.lcd_display_string(time.strftime("WAN= " + publicIP()), 4)