 /*** RouterReset: test if internet is working; if not, reset router
-***/
-
+ *
+ * Karlduino, Dec 2013
+ *
+ * Parts taken from Arduino wifi examples:
+ *   WifiWebClient by dlf, srl, and Tom Igoe
+ *   WifiUdpNtpClient by Michael Margolis and Tom Igoe
+ *   SD/Datalogger by Tom Igoe
+ *
+ ***/
+
+#include <stdio.h>
 #include <SPI.h>
 #include <WiFi.h>
+#include <SPI.h>
+#include <WiFiUdp.h>
+#include <Time.h>
+
 
 // private info [made generic here]
 char ssid[] = "SSID";

  }

}


void printWifiStatus() {
  // print the SSID of the network you're attached to:

    Serial.println(ssid);
    status = WiFi.begin(ssid, pass);

    delay(1000);
  }
  Serial.println("Connected to wifi");
  printWifiStatus();

  Serial.println("Connecting to time server.");
  Udp.begin(localPort);

  Serial.println("Getting time.");
  sendNTPpacket(timeServer); // send an NTP packet to a time server
  delay(500);
  if(  Udp.parsePacket() ) get_and_print_time();
}

void loop() {
