Skip to content

Commit 23955b9

Browse files
authored
Merge pull request #85 from Qrome/2.7
2.7
2 parents 289100d + c8963da commit 23955b9

File tree

101 files changed

+8087
-1780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+8087
-1780
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ It is recommended to use Arduino IDE. You will need to configure Arduino IDE to
7676
Use the Arduino guide for details on how to installing and manage libraries https://www.arduino.cc/en/Guide/Libraries
7777
**Packages** -- the following packages and libraries are used (download and install):
7878
<ESP8266WiFi.h>
79-
<ArduinoJson.h> --> https://github.com/bblanchon/ArduinoJson (version 5.13.X)
8079
<ESP8266WebServer.h>
8180
<WiFiManager.h> --> https://github.com/tzapu/WiFiManager
8281
"FS.h"
@@ -85,6 +84,8 @@ Use the Arduino guide for details on how to installing and manage libraries http
8584
<Max72xxPanel.h> --> https://github.com/markruys/arduino-Max72xxPanel
8685
<JsonStreamingParser.h> --> https://github.com/squix78/json-streaming-parser
8786

87+
Note ArduinoJson (version 5.13.1) is now included as a library file in version 2.7 and later.
88+
8889
## Initial Configuration
8990
Starting with version 2.0 editing the **Settings.h** file is optional. All API Keys are now managed in the Web Interface except for the GeoNames Key. It is not required to edit the Settings.h file before loading and running the code.
9091
* Open Weather Map API Key: http://openweathermap.org/

marquee.ino.d1_mini_2.6.bin

-409 KB
Binary file not shown.

marquee.ino.d1_mini_2.7.bin

568 KB
Binary file not shown.

marquee.ino.d1_mini_wide_2.6.bin

-409 KB
Binary file not shown.

marquee.ino.d1_mini_wide_2.7.bin

569 KB
Binary file not shown.

marquee/BitcoinApiClient.h

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,54 @@
1-
/** The MIT License (MIT)
2-
3-
Copyright (c) 2018 David Payne
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
22-
*/
23-
24-
#pragma once
25-
#include <ESP8266WiFi.h>
26-
#include <ESP8266HTTPClient.h>
27-
#include <ArduinoJson.h>
28-
29-
class BitcoinApiClient {
30-
31-
private:
32-
33-
String myCurrency = "";
34-
35-
const char* servername = "api.coindesk.com"; // remote server we will connect to https://www.coindesk.com/api/
36-
37-
typedef struct {
38-
String code;
39-
String rate;
40-
String description;
41-
float rate_float;
42-
} bpi;
43-
44-
bpi bpiData;
45-
46-
public:
47-
BitcoinApiClient();
48-
void updateBitcoinData(String currencyCode);
49-
50-
String getCode();
51-
String getRate();
52-
String getDescription();
53-
float getRateFloat();
54-
};
1+
/** The MIT License (MIT)
552
3+
Copyright (c) 2018 David Payne
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
*/
23+
24+
#pragma once
25+
#include <ESP8266WiFi.h>
26+
#include <ESP8266HTTPClient.h>
27+
#include "libs/ArduinoJson/ArduinoJson.h"
28+
29+
class BitcoinApiClient {
30+
31+
private:
32+
33+
String myCurrency = "";
34+
35+
const char* servername = "api.coindesk.com"; // remote server we will connect to https://www.coindesk.com/api/
36+
37+
typedef struct {
38+
String code;
39+
String rate;
40+
String description;
41+
float rate_float;
42+
} bpi;
43+
44+
bpi bpiData;
45+
46+
public:
47+
BitcoinApiClient();
48+
void updateBitcoinData(String currencyCode);
49+
50+
String getCode();
51+
String getRate();
52+
String getDescription();
53+
float getRateFloat();
54+
};

marquee/GeoNamesClient.h

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,54 @@
1-
/** The MIT License (MIT)
2-
3-
Copyright (c) 2018 David Payne
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
22-
*/
23-
24-
#pragma once
25-
#include <ESP8266WiFi.h>
26-
#include <ArduinoJson.h>
27-
28-
class GeoNamesClient {
29-
30-
private:
31-
String myLat = "";
32-
String myLon = "";
33-
String myUserName = "";
34-
boolean isDst = true; // Daylight Savings Time
35-
36-
int hours = 0;
37-
int minutes = 0;
38-
String datetime = "";
39-
40-
const char* servername = "api.geonames.org"; // remote server we will connect to
41-
42-
public:
43-
GeoNamesClient(String UserName, String lat, String lon, boolean useDst);
44-
void updateClient(String UserName, String lat, String lon, boolean useDst);
45-
float getTimeOffset();
46-
String getHours();
47-
String getMinutes();
48-
String getYear();
49-
String getMonth00();
50-
String getMonth(boolean zeroPad);
51-
String getMonthName();
52-
String getDay00();
53-
String getDay(boolean zeroPad);
54-
};
1+
/** The MIT License (MIT)
552
3+
Copyright (c) 2018 David Payne
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
*/
23+
24+
#pragma once
25+
#include <ESP8266WiFi.h>
26+
#include "libs/ArduinoJson/ArduinoJson.h"
27+
28+
class GeoNamesClient {
29+
30+
private:
31+
String myLat = "";
32+
String myLon = "";
33+
String myUserName = "";
34+
boolean isDst = true; // Daylight Savings Time
35+
36+
int hours = 0;
37+
int minutes = 0;
38+
String datetime = "";
39+
40+
const char* servername = "api.geonames.org"; // remote server we will connect to
41+
42+
public:
43+
GeoNamesClient(String UserName, String lat, String lon, boolean useDst);
44+
void updateClient(String UserName, String lat, String lon, boolean useDst);
45+
float getTimeOffset();
46+
String getHours();
47+
String getMinutes();
48+
String getYear();
49+
String getMonth00();
50+
String getMonth(boolean zeroPad);
51+
String getMonthName();
52+
String getDay00();
53+
String getDay(boolean zeroPad);
54+
};

marquee/OctoPrintClient.h

Lines changed: 76 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,77 @@
1-
/** The MIT License (MIT)
2-
3-
Copyright (c) 2018 David Payne
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
22-
*/
23-
24-
#pragma once
25-
#include <ESP8266WiFi.h>
26-
#include <ArduinoJson.h>
27-
#include <base64.h>
28-
29-
class OctoPrintClient {
30-
31-
private:
32-
char myServer[100];
33-
int myPort = 80;
34-
String myApiKey = "";
35-
String encodedAuth = "";
36-
37-
void resetPrintData();
38-
boolean validate();
39-
40-
String result;
41-
42-
typedef struct {
43-
String averagePrintTime;
44-
String estimatedPrintTime;
45-
String fileName;
46-
String fileSize;
47-
String lastPrintTime;
48-
String progressCompletion;
49-
String progressFilepos;
50-
String progressPrintTime;
51-
String progressPrintTimeLeft;
52-
String state;
53-
String error;
54-
} PrinterStruct;
55-
56-
PrinterStruct printerData;
57-
58-
59-
public:
60-
OctoPrintClient(String ApiKey, String server, int port, String user, String pass);
61-
void getPrinterJobResults();
62-
void updateOctoPrintClient(String ApiKey, String server, int port, String user, String pass);
63-
64-
String getAveragePrintTime();
65-
String getEstimatedPrintTime();
66-
String getFileName();
67-
String getFileSize();
68-
String getLastPrintTime();
69-
String getProgressCompletion();
70-
String getProgressFilepos();
71-
String getProgressPrintTime();
72-
String getProgressPrintTimeLeft();
73-
String getState();
74-
boolean isPrinting();
75-
boolean isOperational();
76-
String getError();
77-
};
1+
/** The MIT License (MIT)
782
3+
Copyright (c) 2018 David Payne
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
*/
23+
24+
#pragma once
25+
#include <ESP8266WiFi.h>
26+
#include "libs/ArduinoJson/ArduinoJson.h"
27+
#include <base64.h>
28+
29+
class OctoPrintClient {
30+
31+
private:
32+
char myServer[100];
33+
int myPort = 80;
34+
String myApiKey = "";
35+
String encodedAuth = "";
36+
37+
void resetPrintData();
38+
boolean validate();
39+
40+
String result;
41+
42+
typedef struct {
43+
String averagePrintTime;
44+
String estimatedPrintTime;
45+
String fileName;
46+
String fileSize;
47+
String lastPrintTime;
48+
String progressCompletion;
49+
String progressFilepos;
50+
String progressPrintTime;
51+
String progressPrintTimeLeft;
52+
String state;
53+
String error;
54+
} PrinterStruct;
55+
56+
PrinterStruct printerData;
57+
58+
59+
public:
60+
OctoPrintClient(String ApiKey, String server, int port, String user, String pass);
61+
void getPrinterJobResults();
62+
void updateOctoPrintClient(String ApiKey, String server, int port, String user, String pass);
63+
64+
String getAveragePrintTime();
65+
String getEstimatedPrintTime();
66+
String getFileName();
67+
String getFileSize();
68+
String getLastPrintTime();
69+
String getProgressCompletion();
70+
String getProgressFilepos();
71+
String getProgressPrintTime();
72+
String getProgressPrintTimeLeft();
73+
String getState();
74+
boolean isPrinting();
75+
boolean isOperational();
76+
String getError();
77+
};

0 commit comments

Comments
 (0)