Pages: [1]   Go Down
Author Topic: Need a controller for Red-White-Blue fade loop for RGB strips  (Read 926 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Currently I have the cheap universal remote box
I googled that, but too many hits. Sorry.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

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
}
Logged

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: