This code obtains WX from OWM and shows it in several ways, current and forecasted.
Now available, gradient lines for the graphs. It looks so much better to me. I hope you enjoy it. The code for gradient lines is in this project. It is not available from tft_espi, only here.
This new version enables you to have multiple cities listed and change between them with the press of a button. One button turns on the display and the other changes the city. If you change the city, the display is turned on to show the results. You need not press the other button.
You will need to obtain a free OneCall API key from the OpenWeatherMap site and put it in this code. It is good for up to 1,000 free calls/day. There are other customiations to be made in the Defines_and_Docs tab. And, change your cities to your of interest. There are two sets of customizations in case you want to share this code with someone.
There are now graphs for temperature, rain and snow. The snow graph will not show unless there is snow in the 5-day forecast. Rain and Temperature will always show. The new graphs are filled in with color, either flat or gradient. Red for temperature, blue for rain and white for snow.
The display now goes off after a time period. It is currently 4 minutes. You can easily change it in the customization section of the Defines_and_Docs tab. If either button is pressed while the display is off, a time and date summary screen will be shown for a few seconds, then the screen rotation will resume for the timeout period. If the bottom button is pressed while the display is on, it will not show the time and date summary screen again, but will reset the timeout to the maximum. It does not add time, just resets it to max timeout. Also, the screen will wake up on the hour just as if a button was pressed.
This is still a work-in-progress but is working as coded. Other functions, features or improvements may be made in the future until I am totally happy with it. This is close to the end of coding for the design I have made. If you have suggestions for additional functions or find errors, please let me know. I accept suggestiong or bug reports without whining like some on Github do. I am always open to improving the tool.
Enjoy, Mike the Midnight Coder






