   Serial.println();
 }
 
-void setup() {
-  //Initialize serial and wait for port to open:
+void setup()
+{
+
   Serial.begin(9600);
 
-  // check for the presence of the shield:
-  if (WiFi.status() == WL_NO_SHIELD) {
-    Serial.println("WiFi shield not present");
-    // don't continue:
-    while (true);
+  // start the Ethernet connection:
+  if (Ethernet.begin(mac) == 0) {
+    Serial.println(F("Failed to configure Ethernet using DHCP"));
+    // no point in carrying on, so do nothing forevermore:
+    for(;;)
+      ;
   }
-
-  String fv = WiFi.firmwareVersion();
-  if ( fv != "1.1.0" )
-    Serial.println("Please upgrade the firmware");
+  
 }
 
-void loop() {
+void loop()
+{
   //we need to call loop for the mqtt library to do its thing and send/receive our messages
   if(skynet.loop()){
   

//another UUID well send a message to
char TOUUID[] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"; 

WiFiClient client;
PubSubClient skynet(server, 1883, onMessage, client);

//we'll run this if anyone messages us

 * This sketch uses the MQTT library to connect to skynet. It sends a message
 * on successful connection and logs data every second.
 *
 * Requires the MQTT library from Nick O'Leary http://knolleary.net/arduino-client-for-mqtt/
 * And one modification in PubSubClient.h, increase MQTT_MAX_PACKET_SIZE from 128 to something like 256
 *
 * Works with ethernet shields compatible with EthernetClient library from
 * Arduino. If you don't know, grab the original 
 * http://arduino.cc/en/Main/ArduinoEthernetShield
 *
 * Remember not to mess with ethernet's unavailable pins (10, 11, 12, 13 and 4 if using SD card)
 *
 * You will notice we're using F() in Serial.print. It is covered briefly on
 * the arduino print page but it means we can store our strings in program
 * memory instead of in ram.
 *
 */

#include <SPI.h>
#include <Ethernet.h>
#include <PubSubClient.h>

//you can't have 2 of the same mac on your network!
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

char server[] = "skynet.im";

