   #ifdef DEBUG
     Serial.println("Starting Up");
     freeMem("At Start: ");
+    Serial.println("initialise modules");
+  #endif
+
+  for (int i=0; i<STRIP_LENGTH; i++) {
+    modules[i].r = 0;
+    modules[i].g = 0;
+    modules[i].b = 0;
+    modules[i].rgb = 0;
+  }
+  
+  modules[1].r = 255;
+  #ifdef DEBUG 
+  freeMem("After struct setup");
   #endif
   
   Ethernet.begin(mac);

int colour_id = 0;

#define STRIP_LENGTH 3 // Number of RGBLED modules connected
long strip_colors[STRIP_LENGTH];

long ind_colours[STRIP_LENGTH]; // actual individual modules.


    Serial.println("Sending data");
    #endif
    client.setDataArrivedDelegate(dataArrived);
    
    // set the connected light to be on.
    digitalWrite(13, HIGH);
  } else {
    #ifdef DEBUG
    Serial.println("Not Connected - check connection and start again");
    #endif
    while (1) {
      //TODO Drop some debug code in here
    }
  }
}

void loop() {
  client.monitor();
  
  // decay the values on the light strip.
  for (int i=0; i < STRIP_LENGTH; i++) {
    if (--modules[i].r < 0) modules[i].r = 0;
    if (--modules[i].g < 0) modules[i].g = 0;
    if (--modules[i].b < 0) modules[i].b = 0;
    
    if (modules[i].r == 0 && modules[i].b == 0 && modules[i].b == 0) {
        ind_colours[i] = 0;
    } else {
        ind_colours[i] = get_colour(modules[i].r, modules[i].g, modules[i].b);
    }
  }
  
