Go Down

Topic: Need a controller for Red-White-Blue fade loop for RGB strips (Read 994 times) previous topic - next topic

Tresvatos

hello everyone, pleased to be on the forum!

For our 4th of July here in the U.S.A. I would like to find a controller that can have my six analog RGB 16.4 m strips mounted on my pier in front of house fade from Red-White -Blue in a slow fading loop.

Can some forum members give me an idea of a good set-up to get in order to achieve this display.

Currently I have the cheap universal remote box that has fade and several other mode choices, but no Red-white-blue.

Thanks for any suggestions!

PaulS

Quote
Currently I have the cheap universal remote box

I googled that, but too many hits. Sorry.

robtillaart


this code is not working but should get you started
Code: [Select]


struct color
{
  int R;  // holds 0..255
  int G;
  int B;
}

color myColor;

void setup()
{
  // setup thingies
  myColor.R = 255;
  myColor.G = 0;
  myColor.B = 0;
}

void loop()
{
  fadeRedToWhite();
  fadeWhiteToBlue();
  fadeBlueToRed();
}

void fadeRedToWhite()
{
  // R is already max
  for (int i=0; i< 255; i++)
  {
    myColor.G = i;
    myColor.B = i;
    setColor(myColor);
    delay(100);
  }
}

void fadeWhiteToBlue()
{
  // Blue is already OK
  for (int i=0; i< 255; i++)
  {
    myColor.R = 255-i;
    myColor.G = 255-i;
    setColor(myColor);
    delay(100);
  }
}

void fadeBlueToRed()
{
    for (int i=0; i< 255; i++)
  {
    mycolor.R = i;
    myColor.B = 255-i;
    setColor(myColor);
    delay(100);
  }
}
void  setColor(int c)
{
  // do the Hardware thing
}

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Tresvatos

Cheap universal RGB control box that has the 7 modes, goes thru flashing, strobe, around 7 colors..

Go Up