Vixen 3 arduino code

Good day, I was wondering if there is anyone that might be able to help me with a problem I am having. I have been working with a 12 channel sequence and the arduino uno to try and create my own holiday display. However every time I use a different code I have the same problem. On every note all of my resisters cycle through in different orders even if vixen 3 is only calling for one string to be on. I have only recently started trying my hand at writing code and have been very unsuccessful. If there is anyone's that may have a written code or any suggestions that may help that would be great.

Thanks, Robert

Hi, welcome to the forum. Can show us your sketch between code tags (use one of the button).

Text between code tags is like this:

Hello, this is text between code tags.

Get to know more.

Hi,
I also have this problem, This is my code. Can some one please help…

/ Define which pins control which channels with Vixen 3 and Arduino UNO
#define CHAN01 2
#define CHAN02 3
#define CHAN03 4
#define CHAN04 5
#define CHAN05 6
#define CHAN06 7
#define CHAN07 8
#define CHAN08 9
#define CHAN09 10
#define CHAN10 11
#define CHAN11 12
#define CHAN12 13

int channels = {CHAN01,CHAN02,CHAN03,CHAN04,CHAN05,CHAN06,CHAN07,CHAN08,CHAN09,
CHAN10,CHAN11,CHAN12};

// Total Channel Count
#define CHANNEL_COUNT 12

// Serial Speed
#define PC_COM_SPEED 9600

int i = 0;
int incomingByte[CHANNEL_COUNT];

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

// Set the channel pins to output mode
for(int channelIndex=0;channelIndex<CHANNEL_COUNT;channelIndex++){
pinMode(channels[channelIndex],OUTPUT);
}

powerOnSelfTest();
}

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

  • } *

  • digitalWrite(CHAN01, incomingByte[0]); *

  • digitalWrite(CHAN02, incomingByte[1]);*

  • digitalWrite(CHAN03, incomingByte[2]); *

  • digitalWrite(CHAN04, incomingByte[3]);*

  • digitalWrite(CHAN05, incomingByte[4]); *

  • digitalWrite(CHAN06, incomingByte[5]); *

  • digitalWrite(CHAN07, incomingByte[6]); *

  • digitalWrite(CHAN08, incomingByte[7]); *

  • digitalWrite(CHAN09, incomingByte[8]);*

  • digitalWrite(CHAN10, incomingByte[9]); *

  • digitalWrite(CHAN11, incomingByte[10]);*

  • digitalWrite(CHAN12, incomingByte[11]);*

  • }*
    }
    void powerOnSelfTest()
    {

  • Serial.println(“Power on self test running.”);*

  • for(int channelIndex=0;channelIndex<CHANNEL_COUNT;channelIndex++){*

  • Serial.print("Channel: ");*

  • Serial.println(channelIndex+1,DEC);*

  • analogWrite(channels[channelIndex], 255); // Turn ON relays one channel at a time*

  • delay(100); // Wait .1 seconds*

  • analogWrite(channels[channelIndex], 0);*

  • }*

  • turnAllLightsOn();*

  • delay(1000);*

  • turnAllLightsOff();*

  • delay(1000);*

  • turnAllLightsOn();*

  • delay(2000);*

  • turnAllLightsOff();*
    }
    void turnAllLightsOn()
    {

  • // Turn all Channels ON*

  • for(int channelIndex=0;channelIndex<CHANNEL_COUNT;channelIndex++){*

  • analogWrite(channels[channelIndex], 255);*

  • }*
    }
    void turnAllLightsOff()
    {

  • // Turn all Channels OFF*

  • for(int channelIndex=0;channelIndex<CHANNEL_COUNT;channelIndex++){*

  • analogWrite(channels[channelIndex], 0);*

  • }*
    }

. . . and now with code tags, please.

aaronleach: I also have this problem, This is my code. Can some one please help...

Did you miss Reply #1 ?

...R