@@ -24,7 +24,7 @@ See more at http://blog.squix.ch
2424*/
2525
2626/* Customizations by Neptune (NeptuneEng on Twitter, Neptune2 on Github)
27- *
27+ *
2828 * Added Wifi Splash screen and credit to Squix78
2929 * Modified progress bar to a thicker and symmetrical shape
3030 * Replaced TimeClient with built-in lwip sntp client (no need for external ntp client library)
@@ -42,7 +42,8 @@ See more at http://blog.squix.ch
4242 * Slight adjustment to overlay
4343 */
4444
45- #include < ESP8266WiFi.h>
45+ #include < ESPWiFi.h>
46+ #include < ESPHTTPClient.h>
4647#include < Ticker.h>
4748#include " settings.h"
4849#include < JsonListener.h>
@@ -115,7 +116,7 @@ void setup() {
115116 display.init ();
116117 display.clear ();
117118 display.display ();
118-
119+
119120 display.flipScreenVertically (); // Comment out to flip display 180deg
120121 display.setFont (ArialMT_Plain_10);
121122 display.setTextAlignment (TEXT_ALIGN_CENTER);
@@ -129,7 +130,7 @@ void setup() {
129130 // WiFiManager
130131 // Local intialization. Once its business is done, there is no need to keep it around
131132 WiFiManager wifiManager;
132-
133+
133134 // Uncomment for testing wifi manager
134135 // wifiManager.resetSettings();
135136 wifiManager.setAPCallback (configModeCallback);
@@ -160,7 +161,7 @@ void setup() {
160161
161162 ui.setTargetFPS (30 );
162163 ui.setTimePerFrame (10 *1000 ); // Setup frame display time to 10 sec
163-
164+
164165 // Hack until disableIndicator works:
165166 // Set an empty symbol
166167 ui.setActiveSymbol (emptySymbol);
@@ -196,7 +197,7 @@ void loop() {
196197
197198 if (readyForDHTUpdate && ui.getUiState ()->frameState == FIXED)
198199 updateDHT ();
199-
200+
200201 int remainingTimeBudget = ui.update ();
201202
202203 if (remainingTimeBudget > 0 ) {
@@ -255,7 +256,7 @@ void updateData(OLEDDisplay *display) {
255256 drawProgress (display, 80 , " Updating DHT Sensor" );
256257 temperature = dht.readTemperature (!IS_METRIC);
257258 delay (500 );
258-
259+
259260 drawProgress (display, 90 , " Updating thingspeak..." );
260261 thingspeak.getLastChannelItem (THINGSPEAK_CHANNEL_ID, THINGSPEAK_API_READ_KEY);
261262 readyForWeatherUpdate = false ;
@@ -276,7 +277,7 @@ void drawDateTime(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, in
276277 char time_str[11 ];
277278 time_t now = dstAdjusted.time (&dstAbbrev);
278279 struct tm * timeinfo = localtime (&now);
279-
280+
280281 display->setTextAlignment (TEXT_ALIGN_CENTER);
281282 display->setFont (ArialMT_Plain_10);
282283 String date = ctime (&now);
@@ -285,7 +286,7 @@ void drawDateTime(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, in
285286 display->drawString (64 + x, 5 + y, date);
286287 display->setFont (DSEG7_Classic_Bold_21);
287288 display->setTextAlignment (TEXT_ALIGN_RIGHT);
288-
289+
289290#ifdef STYLE_24HR
290291 sprintf (time_str, " %02d:%02d:%02d\n " ,timeinfo->tm_hour , timeinfo->tm_min , timeinfo->tm_sec );
291292 display->drawString (108 + x, 19 + y, time_str);
@@ -314,7 +315,7 @@ void drawCurrentWeather(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t
314315
315316 display->setFont (ArialMT_Plain_24);
316317 String temp = wunderground.getCurrentTemp () + (IS_METRIC ? " °C" : " °F" );
317-
318+
318319 display->drawString (60 + x, 15 + y, temp);
319320 int tempWidth = display->getStringWidth (temp);
320321
0 commit comments