Implement cloud cover

This commit is contained in:
Robert Marshall 2018-09-22 13:04:05 +01:00
parent 5ffc1b8b0c
commit e9114275ae
3 changed files with 75 additions and 10 deletions

View file

@ -1,9 +1,25 @@
#define WEATHER_URL "https://api.openweathermap.org/data/2.5/weather?lat=%s&lon=%s&appid=%s"
#include <Arduino.h>
#define WEATHER_URL "http://api.openweathermap.org/data/2.5/weather?lat=%s&lon=%s&appid=%s"
enum WeatherCondition
{
Clear,
Rain,
Thunder,
Other
};
class Weather{
char _url[100];
char _url[120];
int _cloudCover;
WeatherCondition _condition;
String getWeatherJson();
WeatherCondition parseCondition(int weatherId);
public:
public:
Weather(char *lat, char *lon);
void update();
int getCloudCover() { return _cloudCover; }
WeatherCondition getCondition() { return _condition; }
};