How do I change the forecast to shows max forecast weather?
currently its shows the minimum.
I know what a weather forecast is but further I have no idea what you're talking about.
Can you elaborate?
Is there an Arduino involved? If so, post your sketch following the instructions in https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966#posting-code-and-common-code-problems.
Hi,
I'm using the openweater example on Arduino IDE. with esp-1 and sd1306.
The program works fine, showing three screens with time, current temp, and three days forecast.
In the three days forecast it shows the min_temp on the display. I'm looking to change it to max_temp.
I run the API and the information is there. However the program pull the min temp. How do I change it to display the max temp?
Thank you.
Maybe others know what the open weather example is. I've tried a board from the ESP8266 family (Wemos D1 Mini) and from the ESP32 family (ESP32 Dev Module) but did not see an/the open weather example.
It's probably me.
Do you use - Weather API - OpenWeatherMap
Yes
Can you post the sketch as we do not have that library installed.
In IDE I down load the library esp8266 Weather Station by ThingPulse ver 2.30 (which the ESP-01 is part of this family).
Then under examples -->esp8266 weather station->weather station demo. Its work correctly. i just wonder if there is a way to show the max_temp instead of the low_temp in the forecast.
Looking at the PAI return, the info is there.
,"weather":
"temp":38.98,"feels_like":36.68,"temp_min":38.98,"temp_max":38.98,"pressure":1012,"sea_level":1012,"grnd_level":1005,"humidity":86,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":99},"wind":
I think that String temp = String(forecasts[dayIndex].temp, 0) + (IS_METRIC ? "°C" : "°F"); specifies the temperature to display. Try
String temp = String(forecasts[dayIndex].temp_max, 0) + (IS_METRIC ? "°C" : "°F");
Note
I can not compile this because I do not have everything that is needed. I suggest that the next time you post your complete sketch here and mention exactly how you installed every single library.
Thank you for trying to help.
forecasts[dayIndex].temp_max will generate compilation error as .temp_max doesn't define.
Going to close the issue since it was discussed in git hub (without a solution, looks like they its written)
Thanks again for looking into it.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.