IR remote and RGB diodes

I am working on a project for my parents, where they easily can change the PWM for the R G B channels with a remote.

To read the IR signal, I used the lib. from this site http://www.arcfn.com/2009/09/arduino-universal-remote-record-and.html

So far it only turns them on at full power when the arduino is powered up, but later versions should use the EEPROM to store different presets.

When selecting a color with the remote, the selected color will blink fast to indicate which one is selected. Same thing will happen when that color is at full brightness and same for low.

#include <IRremote.h>

#define blinkDelay 100
#define valueSteps 25

#define lowFlash 25

int RECV_PIN = 2;

IRrecv irrecv(RECV_PIN);

decode_results results;

int ledValues[3] = { 
  255, 255, 255 };

const int ledPins[3] = { 
  9, 10, 6 };

int activeLED = -1;

int value = 255;

boolean power = true;

void setup()
{
  irrecv.enableIRIn(); // Start the receiver

  pinMode(ledPins[0], OUTPUT); //R
  pinMode(ledPins[1], OUTPUT); //G
  pinMode(ledPins[2], OUTPUT); //B

  analogWrite(ledPins[0], ledValues[0]);
  analogWrite(ledPins[1], ledValues[1]);
  analogWrite(ledPins[2], ledValues[2]);
}

void loop()
{
  if (irrecv.decode(&results))
  {
    if (results.value != 4294967295)
    {
      if (power == true)
      {

        if (results.value == 16754775) //Vol+
        {
          ledValues[activeLED] += valueSteps;
          if (ledValues[activeLED] > 255)
          {
            ledValues[activeLED] = 255;

            analogWrite(ledPins[activeLED], 0);
            delay(blinkDelay);
            analogWrite(ledPins[activeLED], ledValues[activeLED]);
          }

          analogWrite(ledPins[0], ledValues[0]);
          analogWrite(ledPins[1], ledValues[1]);
          analogWrite(ledPins[2], ledValues[2]);
        }
        else if (results.value == 16769055) //Vol-
        {
          ledValues[activeLED] -= valueSteps;

          if (ledValues[activeLED] < 0)
          {
            ledValues[activeLED] = 0;

            analogWrite(ledPins[activeLED], lowFlash);
            delay(blinkDelay);
            analogWrite(ledPins[activeLED], ledValues[activeLED]);
          }

          analogWrite(ledPins[0], ledValues[0]);
          analogWrite(ledPins[1], ledValues[1]);
          analogWrite(ledPins[2], ledValues[2]);
        }


        else if (results.value == 16720605) //Prev (R)
        {
          activeLED = 0; //0 = RED in array

          ledSelected(); //Flash selected led
        }

        else if (results.value == 16712445) //Next (G)
        {
          activeLED = 1; //0 = GREEN in array

          ledSelected(); //Flash selected led
        }

        else if (results.value == 16761405) //Play (B)
        {
          activeLED = 2; //0 = BLUE in array

          ledSelected(); //Flash selected led
        }

        else if (results.value == 16753245) //Power
        {
          power = false;

          analogWrite(ledPins[0], 0);
          analogWrite(ledPins[1], 0);
          analogWrite(ledPins[2], 0);
        }
      }
      else
      {
        if (results.value == 16753245) //Power
        {
          power = true;

          analogWrite(ledPins[0], ledValues[0]);
          analogWrite(ledPins[1], ledValues[1]);
          analogWrite(ledPins[2], ledValues[2]);
        }
      }
    }
    irrecv.resume(); // Receive the next value
  }
}

void ledSelected()
{
  if (ledValues[activeLED] == 0)
  {
    analogWrite(ledPins[activeLED], lowFlash);
    delay(blinkDelay);
    analogWrite(ledPins[activeLED], ledValues[activeLED]);
  }
  else
  {
    analogWrite(ledPins[activeLED], 0);
    delay(blinkDelay);
    analogWrite(ledPins[activeLED], ledValues[activeLED]);
  }
}

looks great, good work!