 */
 
 RGBLamp lamps[4];
+int colors[216][3];
+int dayCols[10][3];
 
 void setup() {
   

  lamps[3].create(11,12,13);

  // Sets all lamps to a random color
  for (int lamp = 0; lamp < 4; lamp++) {
    int col[] = {random(0, 255),random(0, 255),random(0, 255)};
    lamps[lamp].setColor(col);
    //lamps[lamp].on();
  }

  // Sleeps for 2 seconds to test the output before moving on
  delay(2000);
}

// This will carry out the fades and so on. These must be run each loop! (!!!)

  if(finish) {
    // Sets all lamps to fade to a random color
    for (int lamp = 0; lamp < 4; lamp++) {
      lamps[lamp].fade(10000, colors[random(0, 215)]);
    }
  }
}

void setColors() {
  
  // Set up a 216 color array, so that we dont get all whites
  int i = 0;
  for(int r = 0; r <= 255; r += 51) {
    for(int g = 0; g <= 255; g += 51) {
      for(int b = 0; b <= 255; b += 51) {
        colors[i][0] = r;
        colors[i][1] = g;
        colors[i][2] = b;
        i++;
      }
    }
  }
  
  // Trying to simulate the colors of the day
  dayCols[3] = {174,183,190}; // overcast
  
  // Sunset
  dayCols[0][0] = 182;
  dayCols[0][1] = 126;
  dayCols[0][2] = 91;
  
  // Noon
  dayCols[1][0] = 192;
  dayCols[1][1] = 191;
  dayCols[1][2] = 173;
  
  // Clouds, haze
  dayCols[2][0] = 189;
  dayCols[2][1] = 190;
  dayCols[2][2] = 192;
  
  // Overcast
  dayCols[3][0] = 174;
  dayCols[3][1] = 183;
  dayCols[3][2] = 190;
  
}

// This is our main loop
