piotr-kubica / weather-tiny

Tiny weather station based on TTGO T5 V2.3.1 (ESP32 with 2.13" e-ink display)
GNU General Public License v2.0
25 stars 7 forks source link

Daily forecast for rain #4

Open mattcalavera opened 2 years ago

mattcalavera commented 2 years ago

Hi! Many thanks for your beautiful works!! Could please be possibile to switch between hourly rain forecast and daily rain forecast, instead (or in the same way) now we switch from the two location??

Thanks

Enhancements

piotr-kubica commented 2 years ago

No problem. Feel free to change code to your liking

mattcalavera commented 1 year ago

can you please suggest where, in the code, to work? there are many structures in code and it's not so easy to understand

piotr-kubica commented 1 year ago

@mattcalavera the location change happens on button press which wakes up the device. The cause of this wakeup is handled in this function https://github.com/piotr-kubica/weather-tiny/blob/19708bc4932226a28e3403b3fe56d250bcc236e3/weather_tiny/weather_tiny.ino#L456

The response from OpenWeatherApi is handled in this function https://github.com/piotr-kubica/weather-tiny/blob/19708bc4932226a28e3403b3fe56d250bcc236e3/weather_tiny/weather_tiny.ino#LL271C6-L271C21

Also, look up the API to see how it's structured https://openweathermap.org/api

I hope this helps you with your changes.

mattcalavera commented 1 year ago

Hi! I start with saving forecasts for next 5 days instead of next 2 days : in

https://github.com/piotr-kubica/weather-tiny/blob/19708bc4932226a28e3403b3fe56d250bcc236e3/weather_tiny/api_request.h#L263

How can I save forecasts for next 5 days?? (in the api response there are next 7 days!)

mattcalavera commented 1 year ago

Ok, after a few work I obtain next 5 days rain forecast.... I'll fork this project with the new code if someone is interested