Vixen + El sequencer(with xbee) 8ch el wire control

soulcity2010

New member
hi i'm alex from south korea
I have been tested to control the El Seqeuncer (8ch) with xbee from Vixen and I succeeded
but i want to control many el sequencer
Untitled-1.jpg

this is sequencer no.1 code

Code:
/*
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

*/

// Output
int Chan1 = 2;  // red LED,   connected to digital pin 5
int Chan2 = 3;  // green LED, connected to digital pin 6
int Chan3 = 4;  // red LED,  connected to digital pin 9
int Chan4 = 5;  // green LED,  connected to digital pin 10
int Chan5 = 6;  // red LED,  connected to digital pin 11
int Chan6 = 7;  // red LED,  connected to digital pin 11
int Chan7 = 8;  // red LED,  connected to digital pin 11
int Chan8 = 9;  // red LED,  connected to digital pin 11

int i = 0;     // Loop counter
int incomingByte[7];   // array to store the 7 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);
  pinMode(Chan6, OUTPUT);
  pinMode(Chan7, OUTPUT);
  pinMode(Chan8, OUTPUT);
}

void loop()
{  // 7 channels are coming in to the Arduino
   if (Serial.available() >= 8) {
    // read the oldest byte in the serial buffer:
    for (int i=0; i<9; i++) {
      // read each byte
      incomingByte[i] = Serial.read();
    }
    
    analogWrite(Chan1, incomingByte[0]);   // Write current values to LED pins
    analogWrite(Chan2, incomingByte[1]);   // Write current values to LED pins
    analogWrite(Chan3, incomingByte[2]);   // Write current values to LED pins
    analogWrite(Chan4, incomingByte[3]);   // Write current values to LED pins
    digitalWrite(Chan5, incomingByte[4]);   // Write current values to LED pins
    digitalWrite(Chan6, incomingByte[5]);   // Write current values to LED pins
    digitalWrite(Chan7, incomingByte[6]);   // Write current values to LED pins
    digitalWrite(Chan8, incomingByte[7]);   // Write current values to LED pins
   }
}

and sequencer no.2 code

Code:
/*
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

*/

// Output
int Chan8 = 2;  // red LED,   connected to digital pin 5
int Chan9 = 3;  // green LED, connected to digital pin 6
int Chan10 = 4;  // red LED,  connected to digital pin 9
int Chan11 = 5;  // green LED,  connected to digital pin 10
int Chan12 = 6;  // red LED,  connected to digital pin 11
int Chan13 = 7;  // red LED,  connected to digital pin 11
int Chan14 = 8;  // red LED,  connected to digital pin 11
int Chan15 = 9;  // red LED,  connected to digital pin 11

int i = 0;     // Loop counter
int incomingByte[15];   // array to store the 7 values from the serial port

//setup the pins/ inputs & outputs
void setup()
{
  Serial.begin(9600);        // set up Serial at 9600 bps

  pinMode(Chan8, OUTPUT);   // sets the pins as output
  pinMode(Chan9, OUTPUT);
  pinMode(Chan10, OUTPUT);
  pinMode(Chan11, OUTPUT);
  pinMode(Chan12, OUTPUT);
  pinMode(Chan13, OUTPUT);
  pinMode(Chan14, OUTPUT);
  pinMode(Chan15, OUTPUT);
}

void loop()
{  // 7 channels are coming in to the Arduino
   if (Serial.available() >= 16) {
    // read the oldest byte in the serial buffer:
    for (int i=0; i<15; i++) {
      // read each byte
      incomingByte[i] = Serial.read();
    }
    
    analogWrite(Chan8, incomingByte[8]);   // Write current values to LED pins
    analogWrite(Chan9, incomingByte[9]);   // Write current values to LED pins
    analogWrite(Chan10, incomingByte[10]);   // Write current values to LED pins
    analogWrite(Chan11, incomingByte[11]);   // Write current values to LED pins
    analogWrite(Chan12, incomingByte[12]);   // Write current values to LED pins
    analogWrite(Chan13, incomingByte[13]);   // Write current values to LED pins
    analogWrite(Chan14, incomingByte[14]);   // Write current values to LED pins
    analogWrite(Chan15, incomingByte[15]);   // Write current values to LED pins
   }
}

test video
that failed...i don't know what was wrong.... please somebody help me
 
Back
Top