   
   
   randomSeed(analogRead(A3));
-  // generate initial hue
-  hue = random(0,255);
+  // generate initial hues
+  from_hue = random(0,255);
+  to_hue = random(0,255);
   // seed the first cells
   GoLseed();
 }

  return 0;
}

uint8_t hue; //all living cells have a slowly changing colour
void GoLseed(){
  // seed initial cells
  for(uint8_t y=0; y!=ROWS; ++y){

  }
}

uint16_t hue_i = 0;
void sendColors(){
  // interpolate between from_hue and to_hue
  if(++hue_i == HUE_SLOWDOWN*255){
    //select a new hue
    from_hue = to_hue;
    to_hue = random(0,255);
  }
  hue = lerp8by8(from_hue,to_hue,hue_i/HUE_SLOWDOWN);
  
  // Update the hue for the ALIVE leds
  for(uint8_t y=0; y!=ROWS; ++y){
    for(uint8_t x=0; x!=COLS; ++x){
      if(alive[y][x]){
        newleds[xy2i(x,y)].setHSV(hue, 255, 255);
      } else {
        newleds[xy2i(x,y)] = CRGB::Black;
      }
    }
  }
  
  for(uint8_t i_led=0; i_led!=NUM_LEDS; ++i_led){
    for(uint8_t i=0; i!=3; ++i)
      leds[i_led][i] = (uint8_t) (((uint16_t) leds[i_led][i]*24 + newleds[i_led][i])/25);
  }
  
  LEDS.show();
}
