 
 struct colour_module {
   int r;
+  int g;
   int b;
-  int g;
-  long rgb;
+  //long rgb;
 };
 
 struct colour_module modules[STRIP_LENGTH];
 
-//int pos = -1;
-//int red = 0;
-//int blue = 0;
-//int green = 0;
+#define DECAY_TIME 4 // number of cycles to run before decaying the data.
+int decay_counter = 0; // use to keep track of cycles before doing a decay loop.
 
 #define DEBUG
 

    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

      
    }

    // if it's a colour change then lets change the colour.
    if (colour_change) {
      
      #ifdef DEBUG
      Serial.print("Change colour: ");
      Serial.print(colour_change);
      Serial.print(" RGB: (");
      Serial.print(red);
      Serial.print(",");
      Serial.print(green);
      Serial.print(",");
      Serial.print(blue);
      Serial.print(") P: ");
      Serial.println(pos);    
      #endif
      
      // this code adds the new value on top of the existing one
      // and then applies a cap if required
      if ((modules[pos].r += red ) > 255) modules[pos].r = 255;
