Author Topic: 32 channel ssr + 100 ic rgb + 2 codes + 1 ardunio = OOPS, PLEASE help .*solved *  (Read 1532 times)

Offline skykicker

  • Jr. Member
  • **
  • Posts: 7
 <fp.
was able to use the code ardunio so it will work the ws2811(100 pixel string) and tried to add in the code for the ssr but the ssr dose not turn on.
what did i do wrong? Anybody know?
here is the code for the 32 ssr short and sweet code that works the 32 ssr  found both codes on line can't rember the original creators but thank you.
Code: You are not allowed to view links. Register or Login
const int numChannels = 32;
// List Arduino pins in Channel number order
int channels[numChannels] = {2,3,4,5,6,7,8,9,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45};
int incomingByte[numChannels];

void setup()
{
Serial.begin(9600);



for(int i = 0; i < numChannels; i++){
pinMode(channels[i], OUTPUT);
// Start with lights turned off
//digitalWrite(channels[i],0);
digitalWrite(channels[i],0);
}


}

void loop()
{
if (Serial.available() >= numChannels)
{
for (int i=0; i<numChannels;i++)
incomingByte[i] = Serial.read();


for(int i = 0; i < numChannels; i++)
//digitalWrite(channels[i], incomingByte[i]);
digitalWrite(channels[i], incomingByte[i]);
//LED STUFF

}
}

here is the code for the rgbs that work.

Code: You are not allowed to view links. Register or Login
#include <Adafruit_NeoPixel.h>    //  This is the Neo-Pixel library (ws2812)
                                  //  Change to the library for your pixel types
                                  //  Suggest using a library created by Adafruit
                                  //  so the function names will be the same                               
                                 
                                 
                                 
#define DPIN 11                    //  Change this to the pin# connected to your pixels DataIn
                                  //  Will probably need to define a ClockPin for other pixel


int   PixelCount = 100;             //  Set this to the number of Pixels connected

int   bugLevel  = 0;              //  This is just a way I manage turning debugging over serial on/off

 

/*  Sets up the NeoPixel Strip object
 Replace with proper Object initiation for your pixel types */
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PixelCount, DPIN, NEO_RGB + NEO_KHZ800);   



void setup()
{
  delay(0);                    //  A delay for a reason I can't remember. I can live with one in the setup. 
  strip.begin();                 //  Get strip started
  strip.show();                  //  Initialize all pixels to 'off'
 
  Serial.begin(38400);          //  Start the Serial communication
  bugit("Setup Complete",10);    //  DEBUG: Confirm setup is complete


}






void loop()
{                                       // START LOOP
 


 
  if (Serial.available()>2)             // Wait for a few bytes to be recieved
  {
    bugit("Waiting for Header",10);     // DEBUG: Header waiting started
    waitForVixenHeader();               // Header check function
    bugit("VixStart Triggered",10);     //  DEBUG: Header found; getting color data
 
    for (int pixCount=0; pixCount<PixelCount;pixCount++)       // Do this for as many Pixels defined in PixelCount
    {
      int RGB[3];                             // Create array to hold this pixels RGB value                   
      for (int color = 0;color<3;color++)     // For the next 3 incoming bytes
      {                       
        while (Serial.available() < 1)        // Wait for bytes to be received
        {
          delay(10);
        }
        RGB[color] = Serial.read();           // Save this byte to the correct RGB value
      }                                       // Repeat until bytes for this pixels RGB value have been recieved

      strip.setPixelColor(pixCount,RGB[0],RGB[1],RGB[2]);  //Set this pixels new color
     
    }                                         // Repeat untill all pixels have had new RGB value set
    strip.show();                             // Update the strip and show with new color                             
  }                                           // YAY! DO IT AGAIN!
}                                              // END OF LOOP



/**
 *  FUNC    bugit           [manages printing of debugging based on debugging level]
 *  @param  String  bugstr  [string to be be printed]
 *  @param  int     blevel  [the level at which this debugging should be ignored]
 *   
*/


int bugit(String bugstr,int blevel)
{
  if (blevel < bugLevel)
  {
    Serial.println(bugstr);
  }
}


/**
 * I 'borrowed' snippets of this waitForVixenHeader() function from some code I found online
 * Can't find the originator now but thank you. It works well. 
 *
 */
void waitForVixenHeader()
{

    bugit("Waiting Loop",10);
    char *header="VIXStart";
    char buffer[3];
    int index = 0;

    while (true)
    {

        int inByte = Serial.read();
        if(inByte==-1)
        {
          continue;
        }
       
        buffer[index] = inByte;
        if(buffer[index]!=header[index])
        {           
            index=-1;                     // not the right sequence restart
        }
       
        buffer[index+1] = 0;              // add null
        index++;
        if(index==8)
        {
          return;
        }
    }
}


then i tried to combine like this :

Code: You are not allowed to view links. Register or Login
/*=====================================
=            VixPix Sketch            =

  For basic control of RGB Pixels
  using Vixen Generic Serial Protocol
=====================================*/

/**
 * VIXEN Setup:
 * In Vixen display setup...
 *    - Add an element group containing one element for each pixel attached to arduino
 *    - Configure the 'Color Handling'  as "They can be any color: Full RGB"
 *    - Add a "Generic Serial Controller"
 *    - Name it what you want (Although... Jdc928IsAwesome is great controller name)
 *    - Set the channel count to 3x the number of Pixels you have
 *    - Save, then configure these options
 *    - Com Port: choose the correct port for your arduino's serial
 *    - Baud Rate: 115200 (or whatever you changed it to below)
 *    - Click OK
 *    - Check the box "Send a text header"
 *    - Type "VIXStart" in the header text box
 *    - Click "OK"
 *
 *    - Click and highlight the newly added Element in the elements list
 *    - Click and highlight the newly created controller
 *    - Your "Total Patch Points" and "Output" counts should match
 *    - Click "Patch Elements to Controllers"
 *    - Click OK and you should be ready to go
 *
 *
 *    You should now be able open a Sequence
      add some effects to the new channels
      and see the strips responding accordingly

 */



/**
 * Pixel Strip Setup
 *    Strips setups vary but generally as follows
 *    - If your using a large number of strips you will
 *      probably want to power them externally.
 *       
 *    - Connect external V+ to strip Vin
 *    - Connect external Gnd to strip Gnd
 *    - Connect external Gnd to Arduino Gnd
 *    - Connect Strip Data to proper pin on Arduino
 *    - Connect Strip DataClock to proper pin on Arduino if not using ws2812
 */



#include <Adafruit_NeoPixel.h>    //  This is the Neo-Pixel library (ws2812)
                                  //  Change to the library for your pixel types
                                  //  Suggest using a library created by Adafruit
                                  //  so the function names will be the same                               
                                 
                                 
                                 
#define DPIN 11                    //  Change this to the pin# connected to your pixels DataIn
                                  //  Will probably need to define a ClockPin for other pixel


int   PixelCount = 100;             //  Set this to the number of Pixels connected

int   bugLevel  = 0;              //  This is just a way I manage turning debugging over serial on/off

 //this is part of the ssr code
const int numChannels = 32;
// List Arduino pins in Channel number order
int channels[numChannels] = {2,3,4,5,6,7,8,9,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45};
int incomingByte[numChannels];

//now pixel code
/*  Sets up the NeoPixel Strip object
 Replace with proper Object initiation for your pixel types */
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PixelCount, DPIN, NEO_RGB + NEO_KHZ800);   



void setup()
{
  delay(0);                    //  A delay for a reason I can't remember. I can live with one in the setup. 
  strip.begin();                 //  Get strip started
  strip.show();                  //  Initialize all pixels to 'off'
 
  Serial.begin(38400);          //  Start the Serial communication
  bugit("Setup Complete",10);    //  DEBUG: Confirm setup is complete

//this is for the ssr
for(int i = 301; i < numChannels; i++){
pinMode(channels[i], OUTPUT);
// Start with lights turned off
//digitalWrite(channels[i],0);
digitalWrite(channels[i],0);
}


}



void loop()
{                                       // START LOOP
 //part of ssr
  if (Serial.available() >= numChannels)
{
for (int i=0; i<numChannels;i++)
incomingByte[i+300] = Serial.read();


for(int i = 0; i < numChannels; i++)
//digitalWrite(channels[i], incomingByte[i]);
digitalWrite(channels[i], 0+incomingByte[i]);

}
// end of ssr now the rest is for pixels
 
  if (Serial.available()>2)             // Wait for a few bytes to be recieved
  {
    bugit("Waiting for Header",10);     // DEBUG: Header waiting started
    waitForVixenHeader();               // Header check function
    bugit("VixStart Triggered",10);     //  DEBUG: Header found; getting color data
 
    for (int pixCount=0; pixCount<PixelCount;pixCount++)       // Do this for as many Pixels defined in PixelCount
    {
      int RGB[3];                             // Create array to hold this pixels RGB value                   
      for (int color = 0;color<3;color++)     // For the next 3 incoming bytes
      {                       
        while (Serial.available() < 1)        // Wait for bytes to be received
        {
          delay(10);
        }
        RGB[color] = Serial.read();           // Save this byte to the correct RGB value
      }                                       // Repeat until bytes for this pixels RGB value have been recieved

      strip.setPixelColor(pixCount,RGB[0],RGB[1],RGB[2]);  //Set this pixels new color
     
    }                                         // Repeat untill all pixels have had new RGB value set
    strip.show();                             // Update the strip and show with new color                             
  }                                           // YAY! DO IT AGAIN!
}                                              // END OF LOOP



/**
 *  FUNC    bugit           [manages printing of debugging based on debugging level]
 *  @param  String  bugstr  [string to be be printed]
 *  @param  int     blevel  [the level at which this debugging should be ignored]
 *   
*/


int bugit(String bugstr,int blevel)
{
  if (blevel < bugLevel)
  {
    Serial.println(bugstr);
  }
}


/**
 * I 'borrowed' snippets of this waitForVixenHeader() function from some code I found online
 * Can't find the originator now but thank you. It works well. 
 *
 */
void waitForVixenHeader()
{

    bugit("Waiting Loop",10);
    char *header="VIXStart";
    char buffer[3];
    int index = 0;

    while (true)
    {

        int inByte = Serial.read();
        if(inByte==-1)
        {
          continue;
        }
       
        buffer[index] = inByte;
        if(buffer[index]!=header[index])
        {           
            index=-1;                     // not the right sequence restart
        }
       
        buffer[index+1] = 0;              // add null
        index++;
        if(index==8)
        {
          return;
        }
    }
}

but for some reason only the leds will work.


Any thoughts would be appreciated
Thank You in advance.

 <pop..

sorry i know not every thing is spelled right, not my strongest trait.
« Last Edit: September 29, 2015, by skykicker »

Offline n1ist

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 760
  • 02148
Re: combined two codes but not all works
« Reply #1 on: September 19, 2015, »
Without looking into too much detail, I see the following:

pinMode and digitalWrite both take individual pin numbers, not an array of pins.  The array itself is indexed with a number between 0 and 31 inclusive.  In setup(), try
Code: You are not allowed to view links. Register or Login
for(uint8_t i = 0; i < numChannels; i++)
{
  pinMode(channels[i], OUTPUT);
  // Start with lights turned off
  digitalWrite(channels[i],0);
}

loop() has some the same issues, and one big issue.  You need to have one loop that handles reading data from the serial port.  I would get rid of the ssr code as you have added and instead, right after bugit("VixStart Triggered",10);, add the code for the ssr
Code: You are not allowed to view links. Register or Login
for(uint8_t i = 0; i < numChannels; i++)
{
  while (Serial.available() < 1)        // Wait for bytes to be received
  {
    delay(10);
  }
  digitalWrite(channels[i], Serial.read());
}

waitForVixenHeader() looks like it has a bug.  buffer[] needed to be at least 9 bytes long if you are putting 8 bytes and a null into it.  I am actually not sure why it is needed in the first place as there is no need to save the bytes you have received.
This would be better
Code: You are not allowed to view links. Register or Login
void waitForVixenHeader()
{
  uint8_t index = 0;

  bugit("Waiting Loop",10);
  const  char *header="VIXStart";

  while (true)
  {
    if (Serial.available() == 0) continue; // Wait until we get a byte from Vixen
   
    if (header[index] != Serial.read())
    {
      index = 0;  // The byte we read doesn't match the 'nth' byte in the header, so start over
    }
    else
    {
      index++; // It's a match.  'index' bytes match so far
      if (index == 8) return;  // All bytes match.  We're done.  Let whoever called us get on with processing the data
    }
  }
}

I haven't tried building this so there may still be some issues.
/mike

Offline skykicker

  • Jr. Member
  • **
  • Posts: 7
Re: combined two codes but not all works
« Reply #2 on: September 21, 2015, »
Thanks mike,
I will give it a shot when i get a chance.
Hopefully tonight.

Offline skykicker

  • Jr. Member
  • **
  • Posts: 7
Re: combined two codes but not all works
« Reply #3 on: September 21, 2015, »
 :-[  :o
thinks i messed up on the code again just the pixels work and nothing going to the relays.

Code: You are not allowed to view links. Register or Login
#include <Adafruit_NeoPixel.h>    //  This is the Neo-Pixel library (ws2812)
                                  //  Change to the library for your pixel types
                                  //  Suggest using a library created by Adafruit
                                  //  so the function names will be the same                               
                                 
                                 
                                 
#define DPIN 11                    //  Change this to the pin# connected to your pixels DataIn
                                  //  Will probably need to define a ClockPin for other pixel


int   PixelCount = 100;             //  Set this to the number of Pixels connected

int   bugLevel  = 0;              //  This is just a way I manage turning debugging over serial on/off

 
const int numChannels = 32;
// List Arduino pins in Channel number order
int channels[numChannels] = {2,3,4,5,6,7,8,9,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45};
int incomingByte[numChannels];

/*  Sets up the NeoPixel Strip object
 Replace with proper Object initiation for your pixel types */
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PixelCount, DPIN, NEO_RGB + NEO_KHZ800);   



void setup()
{
  delay(0);                    //  A delay for a reason I can't remember. I can live with one in the setup. 
  strip.begin();                 //  Get strip started
  strip.show();                  //  Initialize all pixels to 'off'
 
  Serial.begin(38400);          //  Start the Serial communication
  bugit("Setup Complete",10);    //  DEBUG: Confirm setup is complete


for(uint8_t i = 0; i < numChannels; i++)
{
pinMode(channels[i], OUTPUT);
// Start with lights turned off
digitalWrite(channels[i],0);
}


}



void loop()
{                                       // START LOOP
 
  if (Serial.available() >= numChannels)
{
for (int i=0; i<numChannels;i++)
incomingByte[i] = Serial.read();





//digitalWrite(channels[i], incomingByte[i]);
//digitalWrite(channels[i], 0+incomingByte[i]);

}

 
  if (Serial.available()>2)             // Wait for a few bytes to be recieved
  {
    bugit("Waiting for Header",10);     // DEBUG: Header waiting started
    waitForVixenHeader();               // Header check function
    bugit("VixStart Triggered",10);     //  DEBUG: Header found; getting color data

 
    for (int pixCount=0; pixCount<PixelCount;pixCount++)       // Do this for as many Pixels defined in PixelCount
    {
      int RGB[3];                             // Create array to hold this pixels RGB value                   
      for (int color = 0;color<3;color++)     // For the next 3 incoming bytes
      {                       
        while (Serial.available() < 1)        // Wait for bytes to be received
        {
          delay(10);
        }
        RGB[color] = Serial.read();           // Save this byte to the correct RGB value
      }                                       // Repeat until bytes for this pixels RGB value have been recieved

      strip.setPixelColor(pixCount,RGB[0],RGB[1],RGB[2]);  //Set this pixels new color
     
    }                                         // Repeat untill all pixels have had new RGB value set
    strip.show();                             // Update the strip and show with new color                             
  }                                           // YAY! DO IT AGAIN!
}                                              // END OF LOOP



/**
 *  FUNC    bugit           [manages printing of debugging based on debugging level]
 *  @param  String  bugstr  [string to be be printed]
 *  @param  int     blevel  [the level at which this debugging should be ignored]
 *   
*/


int bugit(String bugstr,int blevel)
{
  if (blevel < bugLevel)
  {
    Serial.println(bugstr);
  }
}


/**
 * I 'borrowed' snippets of this waitForVixenHeader() function from some code I found online
 * Can't find the originator now but thank you. It works well. 
 *
 */
void waitForVixenHeader()
{

    bugit("Waiting Loop",10);
    char *header="VIXStart";
    char buffer[3];
    int index = 0;

    while (true)
    {

        int inByte = Serial.read();
        if(inByte==-1)
        {
          continue;
        }
       
        buffer[index] = inByte;
        if(buffer[index]!=header[index])
        {           
            index=-1;                     // not the right sequence restart
        }
       
        buffer[index+1] = 0;              // add null
        index++;
        if(index==8)
        {
          return;
        }
    }
}

Offline skykicker

  • Jr. Member
  • **
  • Posts: 7
Re: combined two codes but not all works
« Reply #4 on: September 21, 2015, »
Guess i will have to just have two controllers, ordered ardunio uno for rgb, hope to network them, with rx and tx , or hopefully the computer will talk to them both.
« Last Edit: September 22, 2015, by skykicker »

Offline n1ist

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 760
  • 02148
Try this.  It compiles, but I don't have the hardware to test it on...
Code: You are not allowed to view links. Register or Login
#include <Adafruit_NeoPixel.h>    //  This is the Neo-Pixel library (ws2812)
                                  //  Change to the library for your pixel types
                                  //  Suggest using a library created by Adafruit
                                  //  so the function names will be the same                               
                                 
                                 
                                 
#define DPIN 11                    //  Change this to the pin# connected to your pixels DataIn
                                  //  Will probably need to define a ClockPin for other pixel


int   PixelCount = 100;             //  Set this to the number of Pixels connected

int   bugLevel  = 0;              //  This is just a way I manage turning debugging over serial on/off

 
const int numChannels = 32;
// List Arduino pins in Channel number order
int channels[numChannels] = {2,3,4,5,6,7,8,9,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45};

/*  Sets up the NeoPixel Strip object
 Replace with proper Object initiation for your pixel types */
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PixelCount, DPIN, NEO_RGB + NEO_KHZ800);   



void setup()
{
  delay(0);                    //  A delay for a reason I can't remember. I can live with one in the setup. 
  strip.begin();                 //  Get strip started
  strip.show();                  //  Initialize all pixels to 'off'
 
  Serial.begin(38400);          //  Start the Serial communication
  bugit("Setup Complete",10);    //  DEBUG: Confirm setup is complete


  for(uint8_t i = 0; i < numChannels; i++)
  {
    pinMode(channels[i], OUTPUT);
    // Start with lights turned off
    digitalWrite(channels[i],0);
  }
}



void loop()
{                                       // START LOOP
 
  bugit("Waiting for Header",10);     // DEBUG: Header waiting started
  waitForVixenHeader();               // Header check function
  bugit("VixStart Triggered",10);     //  DEBUG: Header found; getting color data
 
  // First 'numChannel' channels are relays
  for(uint8_t i = 0; i < numChannels; i++)
  {
    while (Serial.available() < 1)        // Wait for bytes to be received
    {
      delay(10);
    }
    digitalWrite(channels[i], Serial.read());
  }

  // Next 'PixelCount' sets of three channels are pixels
  for (int pixCount=0; pixCount<PixelCount;pixCount++)       // Do this for as many Pixels defined in PixelCount
  {
    int RGB[3];                             // Create array to hold this pixels RGB value                   
    for (int color = 0;color<3;color++)     // For the next 3 incoming bytes
    {                       
      while (Serial.available() < 1)        // Wait for bytes to be received
      {
        delay(10);
      }
      RGB[color] = Serial.read();           // Save this byte to the correct RGB value
    }                                       // Repeat until bytes for this pixels RGB value have been recieved

    strip.setPixelColor(pixCount,RGB[0],RGB[1],RGB[2]);  //Set this pixels new color
     
  }                                         // Repeat untill all pixels have had new RGB value set
  strip.show();                             // Update the strip and show with new color                             
                                            // YAY! DO IT AGAIN!
}                                              // END OF LOOP



/**
 *  FUNC    bugit           [manages printing of debugging based on debugging level]
 *  @param  String  bugstr  [string to be be printed]
 *  @param  int     blevel  [the level at which this debugging should be ignored]
 *   
*/


int bugit(String bugstr,int blevel)
{
  if (blevel < bugLevel)
  {
    Serial.println(bugstr);
  }
}


/**
 * I 'borrowed' snippets of this waitForVixenHeader() function from some code I found online
 * Can't find the originator now but thank you. It works well. 
 *
 * Based on the original waitForVixenHeader() provided, but does not write beyond the end of the buffer
 * Waits forever until it sees the header
 */
void waitForVixenHeader()
{
  uint8_t index = 0;

  const char *header="VIXStart";

  while (true)
  {
    if (Serial.available() == 0) continue; // Wait until we get a byte from Vixen
   
    if (header[index] != Serial.read())
    {
      index = 0;  // The byte we read doesn't match the 'nth' byte in the header, so start over
    }
    else
    {
      index++; // It's a match.  'index' bytes match so far
      if (index == 8) return;  // All bytes match.  We're done.  Let whoever called us get on with processing the data
    }
  }
}

/mike

Offline skykicker

  • Jr. Member
  • **
  • Posts: 7
You are not allowed to view links. Register or Login
Try this.  It compiles, but I don't have the hardware to test it on...
Code: You are not allowed to view links. Register or Login
#include <Adafruit_NeoPixel.h>    //  This is the Neo-Pixel library (ws2812)
                                  //  Change to the library for your pixel types
                                  //  Suggest using a library created by Adafruit
                                  //  so the function names will be the same                               
                                 
                                 
                                 
#define DPIN 11                    //  Change this to the pin# connected to your pixels DataIn
                                  //  Will probably need to define a ClockPin for other pixel


int   PixelCount = 100;             //  Set this to the number of Pixels connected

int   bugLevel  = 0;              //  This is just a way I manage turning debugging over serial on/off

 
const int numChannels = 32;
// List Arduino pins in Channel number order
int channels[numChannels] = {2,3,4,5,6,7,8,9,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45};

/*  Sets up the NeoPixel Strip object
 Replace with proper Object initiation for your pixel types */
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PixelCount, DPIN, NEO_RGB + NEO_KHZ800);   



void setup()
{
  delay(0);                    //  A delay for a reason I can't remember. I can live with one in the setup. 
  strip.begin();                 //  Get strip started
  strip.show();                  //  Initialize all pixels to 'off'
 
  Serial.begin(38400);          //  Start the Serial communication
  bugit("Setup Complete",10);    //  DEBUG: Confirm setup is complete


  for(uint8_t i = 0; i < numChannels; i++)
  {
    pinMode(channels[i], OUTPUT);
    // Start with lights turned off
    digitalWrite(channels[i],0);
  }
}



void loop()
{                                       // START LOOP
 
  bugit("Waiting for Header",10);     // DEBUG: Header waiting started
  waitForVixenHeader();               // Header check function
  bugit("VixStart Triggered",10);     //  DEBUG: Header found; getting color data
 
  // First 'numChannel' channels are relays
  for(uint8_t i = 0; i < numChannels; i++)
  {
    while (Serial.available() < 1)        // Wait for bytes to be received
    {
      delay(10);
    }
    digitalWrite(channels[i], Serial.read());
  }

  // Next 'PixelCount' sets of three channels are pixels
  for (int pixCount=0; pixCount<PixelCount;pixCount++)       // Do this for as many Pixels defined in PixelCount
  {
    int RGB[3];                             // Create array to hold this pixels RGB value                   
    for (int color = 0;color<3;color++)     // For the next 3 incoming bytes
    {                       
      while (Serial.available() < 1)        // Wait for bytes to be received
      {
        delay(10);
      }
      RGB[color] = Serial.read();           // Save this byte to the correct RGB value
    }                                       // Repeat until bytes for this pixels RGB value have been recieved

    strip.setPixelColor(pixCount,RGB[0],RGB[1],RGB[2]);  //Set this pixels new color
     
  }                                         // Repeat untill all pixels have had new RGB value set
  strip.show();                             // Update the strip and show with new color                             
                                            // YAY! DO IT AGAIN!
}                                              // END OF LOOP



/**
 *  FUNC    bugit           [manages printing of debugging based on debugging level]
 *  @param  String  bugstr  [string to be be printed]
 *  @param  int     blevel  [the level at which this debugging should be ignored]
 *   
*/


int bugit(String bugstr,int blevel)
{
  if (blevel < bugLevel)
  {
    Serial.println(bugstr);
  }
}


/**
 * I 'borrowed' snippets of this waitForVixenHeader() function from some code I found online
 * Can't find the originator now but thank you. It works well. 
 *
 * Based on the original waitForVixenHeader() provided, but does not write beyond the end of the buffer
 * Waits forever until it sees the header
 */
void waitForVixenHeader()
{
  uint8_t index = 0;

  const char *header="VIXStart";

  while (true)
  {
    if (Serial.available() == 0) continue; // Wait until we get a byte from Vixen
   
    if (header[index] != Serial.read())
    {
      index = 0;  // The byte we read doesn't match the 'nth' byte in the header, so start over
    }
    else
    {
      index++; // It's a match.  'index' bytes match so far
      if (index == 8) return;  // All bytes match.  We're done.  Let whoever called us get on with processing the data
    }
  }
}

/mike

Mike by George i think you got
 thanks a ton could not have done it with out your help
how ever one small thing i had to do was change the baud rate to 19200, other wise it would randomly flash again'
cant thank you enough.
small test works once it is up and running will try to post a video, extremely pressed for time with my schedule.

Hope to have a couple of sequences done by Halloween.