   
   // Check if we got a signal right now
   triggerCheck();
-}
+ 
+  #ifdef USE_NETWORK 
+    // Check if we got an incoming connection to our server
+    serverCheck();
+  #endif
+}
+
+void serverCheck()
+{
+  #ifdef USE_ETHERNET_SHIELD
+    EthernetClient client = server.available();
+  #endif
+  #ifdef USE_WIFI_SHIELD
+    WiFiClient client = server.available();
+  #endif
+  #ifdef USE_NETWORK
+    // Check for a new connection
+    if (client)
+    {
+      Serial.println("Got a connection!");
+      client.stop();
+    }
+  #endif
+}
+
 
 // All the Ethernet related methods only needed when the shield is used
 #ifdef USE_ETHERNET_SHIELD

// Configuration

// Uncomment these liness if you use an Ethernet Shield
#define USE_ETHERNET_SHIELD
#define ETHERNET_MAC { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }

// Uncomment these lines if you use a WiFi Shield
//#define USE_WIFI_SHIELD
#define WIFI_SSID "ssid"
#define WIFI_KEY "wpakey"

// Uncomment these lines if you use NeoPixel for status visualization
//#define USE_NEOPIXEL
#define NEOPIXEL_PIN 6

// Uncomment these lines if you wish to use the the free strombewusstsein Web Service!
#define USE_STROMBEWUSST_SERVER
#define STROMBEWUSST_SERVER "se.esse.es"
#define STROMBEWUSST_PORT 8888
#define STROMBEWUSST_KEY "foobar"

// TriggerPin - the PIN that gets HIGH when 1.25W/h were used on the line
#define TRIGGER_PIN 8

void strombewusstPush()
{
  // Make sure we have either the Ethernet or WiFi shield enabled
  #ifdef USE_NETWORK  
    // Set the last byte the the current frame's value
    udpBuffer[33] = storage[storagePointer];
    udp.beginPacket(STROMBEWUSST_SERVER, STROMBEWUSST_PORT);
    udp.write(udpBuffer);
    udp.endPacket();
  #endif
}

void pointerChanged()
