Arduino Uno & Vixen 3: Need help with sketch

Hello,
Eventually I would like to have a full blown christmas light display (obviously) but for now I am still trying to figure out Vixen and my Arduino Uno,

Vixen 3:
I have watched several How to Vixen videos and for the most part I believe Vixen is good to go. I have 5 single item lights, each patched to a single output on the Arduino (5 in total) and the Arduino is labeled as a generic serial controller. I have a short sequence just to test the cummunication with the Uno. I created a show and I schedule the show for time -2 minutes (is there a better way to test a show?). I made sure the baud rate and com ports match both the Arduino sketch, IDE settings and device manager.

The Arduino:
I have a simple 5 LED setup on a bread board. I have the 5 PWM outputs from the Arduino connected to the led and a resistor from the opposite leg of the led to ground and ground connected back to the arduino.

The Sketch:

/*
The purpose of this code is to allow the Arduino to use the
generic serial output of vixen lights to control 5 channels of LEDs.
Author: Matthew Strange
Created: 14 October 2010
Modifier: Ben Towner
Modified: 19-OCT-2010
Changes: Addition of 20 Digital On/Off Channels - Setup for Arduino Mega 2560
 
*/
 
// PWM Output - ChanX=PWM Pin
int Chan1 = 2;  
int Chan2 = 3;  
int Chan3 = 4;  
int Chan4 = 5;  
int Chan5 = 6;  
 
 
int i = 0;     // Loop counter
int incomingByte[5];   // array to store the 5 values from the serial port
 
//setup the pins/ inputs & outputs
void setup()
{
  Serial.begin(9600);        // set up Serial at 9600 bps
 
  pinMode(Chan1, OUTPUT);   // sets the pins as output
  pinMode(Chan2, OUTPUT);
  pinMode(Chan3, OUTPUT);
  pinMode(Chan4, OUTPUT);
  pinMode(Chan5, OUTPUT);
}
 
void loop()
{  // 5 channels are coming in to the Arduino
   if (Serial.available() >= 5) {
    // read the oldest byte in the serial buffer:
    for (int i=0; i<5; i++) {
      // read each byte
      incomingByte[i] = Serial.read();
    }
   
    analogWrite(Chan1, incomingByte[0]);   // Write current PWM values to LED pins
    analogWrite(Chan2, incomingByte[1]);  
    analogWrite(Chan3, incomingByte[2]);  
    analogWrite(Chan4, incomingByte[3]);  
    analogWrite(Chan5, incomingByte[4]);   
   }
}

Not sure about the code. I have done a few random sketches with the Uno, mostly beginner stuff but I am not certain at all about the serial detail.

Anyways, I hook up my Arudino and the sketch verifies and uploads without issue. I set my scheduler to play the show 2 min out and when the show starts there is not activity on the UNO.

See image of my Arduino. This is how it looks while the vixen is playing the sequence; cant really tell but the led labeled "L" stays on and the RX and TX remain off.
I verified all the com ports and tried different baud rates with no luck. Dont really know why it is not working. Any ideas?

I believe there is most likely several issues with the sketch and I would appreciate some help fixing it.

Thank you!

VIXEN SETTINGS.pdf (398 KB)

Someone pointed out some issues with my pinout to the arduino so I adjust the code.

The serial monitor shows no activity when the vixen sequence is playing.

Any thoughts?

/*
The purpose of this code is to allow the Arduino to use the
generic serial output of vixen lights to control 5 channels of LEDs.
Author: Matthew Strange
Created: 14 October 2010
Modifier: Ben Towner
Modified: 19-OCT-2010
Changes: Addition of 20 Digital On/Off Channels - Setup for Arduino Mega 2560
 
*/
 
// PWM Output - ChanX=PWM Pin
int Chan1 = 5;  
int Chan2 = 6;  
int Chan3 = 9;  
int Chan4 = 10;  
int Chan5 = 11;  
 
 
int i = 0;     // Loop counter
int incomingByte[5];   // array to store the 5 values from the serial port
 
//setup the pins/ inputs & outputs
void setup()
{
  Serial.begin(9600);        // set up Serial at 9600 bps
 
  pinMode(Chan1, OUTPUT);   // sets the pins as output
  pinMode(Chan2, OUTPUT);
  pinMode(Chan3, OUTPUT);
  pinMode(Chan4, OUTPUT);
  pinMode(Chan5, OUTPUT);
}
 
void loop()
{  // 5 channels are coming in to the Arduino
   if (Serial.available() >= 5) {
    // read the oldest byte in the serial buffer:
    for (int i=0; i<5; i++) {
      // read each byte
      incomingByte[i] = Serial.read();
    }
   
    analogWrite(Chan1, incomingByte[0]);   // Write current PWM values to LED pins
    analogWrite(Chan2, incomingByte[1]);  
    analogWrite(Chan3, incomingByte[2]);  
    analogWrite(Chan4, incomingByte[3]);  
    analogWrite(Chan5, incomingByte[4]);   
   }
}

Have you checked to see if the serial monitor works with a hello world sketch, and have you set the baud rate of the serial com's to the right setting?

Qdeathstar:
Have you checked to see if the serial monitor works with a hello world sketch, and have you set the baud rate of the serial com's to the right setting?

Yes I followed a simple serial tutorial on youtube to enter a value into the serial monitor and get my on board LEd to light up and it worked with no issues; I was able to see the rx and tx leds flashing. Yes I tried several baud rate settings and made sure the rate in the IDE, in vixen and in device manager were all the same.

Hey resjsu - did you get this working? I've been wanting to try this and yesterday I FINALLY created a simple setup with 3 LEDs using an Uno R3 and the latest Vixen ... and it worked. I'd be happy to share and/or (tro to) help.

UncleMoki:
Hey resjsu - did you get this working? I've been wanting to try this and yesterday I FINALLY created a simple setup with 3 LEDs using an Uno R3 and the latest Vixen ... and it worked. I'd be happy to share and/or (tro to) help.

UncleMoki,
I did complete my project after ALOT of setbacks haha. Here is a link to my video:

Some quick details:
7 LED (DUMB) Strips (15m each)
3 Arduino Mega's
3 SSR's
1 Massive Headache