smooth value increment

ok coming into the arduino i have values that at times spike from 400 to about 700
i want something that will increment to smoothly fade from one color to another
instead of just jumping from one color to another i have no idea how to start.

Hi,

where are these values comming from - analog input? If so, try to filter the input, for example:

  int tmpin, anain;
  tmpin = 0;
  for (i=0; i<32;i++) {
    tmpin += analogRead(pin);
  }
  anain = tmpin >> 5;

Use anain as the value used to fade your colors.

Mike