Skip to content

Commit 19669b3

Browse files
committed
Finished Inkplate5 Crypto Tracker example
1 parent 21d0d13 commit 19669b3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/Inkplate5/Projects/Inkplate5_Crypto_Currency_Tracker/Inkplate5_Crypto_Currency_Tracker.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
int timeZone = 2;
3333

3434
// Put in your ssid and password
35-
char ssid[] = "";
36-
char pass[] = "";
35+
char ssid[] = "Soldered";
36+
char pass[] = "dasduino";
3737

3838
// Delay between API calls in miliseconds (first 60 represents minutes so you can change to your need)
3939
#define DELAY_MS 3 * 60 * 1000
4040

4141
// OPTIONAL:
4242
// change to a different currency
43-
char currency[] = "bitcoin";
44-
char currencyAbbr[] = "BTC";
43+
char currency[] = "stellar";
44+
char currencyAbbr[] = "XLM";
4545

4646
// You can find your currency id here:
4747
// https://www.coingecko.com/en/all-cryptocurrencies
@@ -177,7 +177,7 @@ void drawGraph()
177177
maxData = max(maxData, data[i]);
178178
}
179179

180-
double span = max(0.3D, (double)abs(maxData - minData));
180+
double span = max(0.01D, (double)abs(maxData - minData));
181181

182182
// Copy current, min and max data to char arrays to be displayed
183183
dtostrf(data[30], 8, 2, current);

examples/Inkplate5/Projects/Inkplate5_Crypto_Currency_Tracker/Network.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
// Must be installed for this example to work
2828
#include <ArduinoJson.h>
2929

30-
// Dynamic Json from ArduinoJson library
31-
DynamicJsonDocument doc(30000);
32-
3330
/**
3431
* @brief Connect to WiFi with given SSID and password
3532
*
@@ -111,6 +108,9 @@ void Network::getTime(char *timeStr, int timeZone)
111108
*/
112109
bool Network::getData(double *data, char * currency)
113110
{
111+
// Dynamic Json from ArduinoJson library
112+
DynamicJsonDocument doc(30000);
113+
114114
bool f = 0;
115115

116116
// If not connected to wifi reconnect wifi

0 commit comments

Comments
 (0)