       delay(100);
   }
   Serial.println();
-
+  
+  timeClient.begin(); // start NTP time client
+ 
   // Connected!
   Serial.printf("[WIFI] STATION Mode, SSID: %s, IP address: %s\n", WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());
 }
-//------------------------------------------------------------------------------------------------
-
+
+//------------------------------------------------------------------------------------------------
+//MAIN LOOP
+//------------------------------------------------------------------------------------------------
+void loop() {
+  display.clear();     // wipe display clean to refresh it
+  updateIP();          // function call for display update
+  updateTemp();        // fuction call for TMP102 temp
+  updateTime();
+  fauxmo.handle();     // call fauxmo device function
+  display.display();   // write display buffer
+  delay(10);           // loop governor, determine how fast this loop runs
+}
+//------------------------------------------------------------------------------------------------
+

  Serial.print("\tAlert Pin: ");
  Serial.print(alertPinState);
  
  Serial.print("\tAlert Register: ");
  Serial.println(alertRegisterState);
  */
}

  
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.setFont(ArialMT_Plain_16);
  display.drawString(0, 32, "TEMP:");
  display.drawString(80, 32, "F");
  display.drawString(48, 32, (stringVal));
  
  // Check for Alert
  alertPinState = digitalRead(alertPin); // read the Alert from pin
