-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from Qrome/2.5
2.5
- Loading branch information
Showing
96 changed files
with
6,414 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+585 KB
printermonitor.ino.d1_mini_SSD1306-2.4.bin → printermonitor.ino.d1_mini_SH1106-2.5.bin
Binary file not shown.
Binary file renamed
BIN
+585 KB
printermonitor.ino.d1_mini_SH1106-2.4.bin → printermonitor.ino.d1_mini_SSD1306-2.5.bin
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,89 @@ | ||
/** The MIT License (MIT) | ||
Copyright (c) 2018 David Payne | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
*/ | ||
|
||
#pragma once | ||
#include <ESP8266WiFi.h> | ||
#include <ArduinoJson.h> | ||
|
||
class OpenWeatherMapClient { | ||
|
||
private: | ||
String myCityIDs = ""; | ||
String myApiKey = ""; | ||
String units = ""; | ||
String lang = ""; | ||
|
||
const char* servername = "api.openweathermap.org"; // remote server we will connect to | ||
String result; | ||
|
||
typedef struct { | ||
String lat; | ||
String lon; | ||
String dt; | ||
String city; | ||
String country; | ||
String temp; | ||
String humidity; | ||
String condition; | ||
String wind; | ||
String weatherId; | ||
String description; | ||
String icon; | ||
boolean cached; | ||
String error; | ||
} weather; | ||
|
||
weather weathers[5]; | ||
|
||
String roundValue(String value); | ||
|
||
public: | ||
OpenWeatherMapClient(String ApiKey, int CityIDs[], int cityCount, boolean isMetric, String language); | ||
void updateWeather(); | ||
void updateWeatherApiKey(String ApiKey); | ||
void updateCityIdList(int CityIDs[], int cityCount); | ||
void updateLanguage(String language); | ||
void setMetric(boolean isMetric); | ||
|
||
String getWeatherResults(); | ||
|
||
String getLat(int index); | ||
String getLon(int index); | ||
String getDt(int index); | ||
String getCity(int index); | ||
String getCountry(int index); | ||
String getTemp(int index); | ||
String getTempRounded(int index); | ||
String getHumidity(int index); | ||
String getHumidityRounded(int index); | ||
String getCondition(int index); | ||
String getWind(int index); | ||
String getWindRounded(int index); | ||
String getWeatherId(int index); | ||
String getDescription(int index); | ||
String getIcon(int index); | ||
boolean getCached(); | ||
String getMyCityIDs(); | ||
String getWeatherIcon(int index); | ||
String getError(); | ||
}; | ||
/** The MIT License (MIT) | ||
Copyright (c) 2018 David Payne | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
*/ | ||
|
||
#pragma once | ||
#include <ESP8266WiFi.h> | ||
#include "libs/ArduinoJson/ArduinoJson.h" | ||
|
||
class OpenWeatherMapClient { | ||
|
||
private: | ||
String myCityIDs = ""; | ||
String myApiKey = ""; | ||
String units = ""; | ||
String lang = ""; | ||
|
||
const char* servername = "api.openweathermap.org"; // remote server we will connect to | ||
String result; | ||
|
||
typedef struct { | ||
String lat; | ||
String lon; | ||
String dt; | ||
String city; | ||
String country; | ||
String temp; | ||
String humidity; | ||
String condition; | ||
String wind; | ||
String weatherId; | ||
String description; | ||
String icon; | ||
boolean cached; | ||
String error; | ||
} weather; | ||
|
||
weather weathers[5]; | ||
|
||
String roundValue(String value); | ||
|
||
public: | ||
OpenWeatherMapClient(String ApiKey, int CityIDs[], int cityCount, boolean isMetric, String language); | ||
void updateWeather(); | ||
void updateWeatherApiKey(String ApiKey); | ||
void updateCityIdList(int CityIDs[], int cityCount); | ||
void updateLanguage(String language); | ||
void setMetric(boolean isMetric); | ||
|
||
String getWeatherResults(); | ||
|
||
String getLat(int index); | ||
String getLon(int index); | ||
String getDt(int index); | ||
String getCity(int index); | ||
String getCountry(int index); | ||
String getTemp(int index); | ||
String getTempRounded(int index); | ||
String getHumidity(int index); | ||
String getHumidityRounded(int index); | ||
String getCondition(int index); | ||
String getWind(int index); | ||
String getWindRounded(int index); | ||
String getWeatherId(int index); | ||
String getDescription(int index); | ||
String getIcon(int index); | ||
boolean getCached(); | ||
String getMyCityIDs(); | ||
String getWeatherIcon(int index); | ||
String getError(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// ArduinoJson - arduinojson.org | ||
// Copyright Benoit Blanchon 2014-2018 | ||
// MIT License | ||
|
||
#include "src/ArduinoJson.h" |
Oops, something went wrong.