 char pass[] = "";       // your network password           //
 //---------------------------------------------------------//
 
-RtcDS3231 RTC;
 LedControl lc1 = LedControl(D5,D6,D7,1); // Initialize MAX7219
 
 // Initial set up routines

  Serial.println("  Done.");
}

// Set up the RTC.  Also loads RTC time to get time faster.
void RTCSetup() {
  RTC.Begin();

  //If RTC is still valid, set it as current time
  if (RTC.IsDateTimeValid()) {
    RtcDateTime now = RTC.GetDateTime();
    setTime(now.Hour(), now.Minute(), now.Second(), now.Day(), now.Month(), now.Year() );
  }

  //Make sure RTC is actually running...
  if (!RTC.GetIsRunning()){
    RTC.SetIsRunning(true);
  }

  //Never assume the Rtc was last configured by you, so just clear them to your needed state
  RTC.SetSquareWavePin(DS3231SquareWavePin_ModeNone);
}

// Initial set up of NTP

//----------------------------------------------------------------------------------------------------------------

#include <pgmspace.h>     // Used by RTC Library.  Specific for ESP8266
#include <DS3232RTC.h>    // RTC Library
#include <Wire.h>         // Incuded here so that Arduino library object file references work
#include <LedControl.h>   // MAX7219 display control library
#include <ESP8266WiFi.h>  // We need to use the wifi for NTP
