 // (port 80 is default for HTTP):
 EthernetServer server(80);
 
-void setup()
-{
+void setup() {
+  Serial.begin(9600);
   // start the Ethernet connection and the server:
   Ethernet.begin(mac, ip);
   server.begin();
+  Serial.print("server is at ");
+  Serial.println(Ethernet.localIP());
 }
 
-void loop()
-{
+
+void loop() {
   // listen for incoming clients
   EthernetClient client = server.available();
   if (client) {
+    Serial.println("new client");
     // an http request ends with a blank line
     boolean currentLineIsBlank = true;
     while (client.connected()) {
       if (client.available()) {
         char c = client.read();
+        Serial.write(c);
         // if you've gotten to the end of the line (received a newline
         // character) and the line is blank, the http request has ended,
         // so you can send a reply

          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();

          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(analogRead(analogChannel));
            client.println("<br />");
          }
          break;
        }
        if (c == '\n') {

    delay(1);
    // close the connection:
    client.stop();
    Serial.println("client disonnected");
  }
}

