Using DMXP512 (in P5 1.5)
in
Integration and Hardware
•
1 year ago
I'm trying to make very (at this moment) simple setup with Processing and DMX lights: Press a key to turn on lights on. Lights are rgb LED. They have five channels: R, G, B, overall intensity, flashing. So I'm setting 255, 255, 255, 255, 0. This values works in other controling programs (this proves there's no mistake in hardware or driver setup). Processing dmxP512 library which I'm trying to use seems pretty straightforward, but light are still off. Can you see what I'm doing wrong?
import dmxP512.*;
import processing.serial.*;
DmxP512 dmxOutput;
int universeSize=5;
boolean DMXPRO=true;
String DMXPRO_PORT="COM3";
int DMXPRO_BAUDRATE=115000;
void setup() {
frameRate(10);
size(245, 245);
dmxOutput=new DmxP512(this, universeSize, false);
dmxOutput.setupDmxPro(DMXPRO_PORT, DMXPRO_BAUDRATE);
}
void draw() {
background(0);
//dmxOutput.reset();
int[] values = new int[5];
if (keyPressed == true){
background(255);
values[0] = 255;
values[1] = 255;
values[2] = 255;
values[3] = 255;
values[4] = 0;
dmxOutput.set(2, values); //channel, values
println(values);
}
}
The example from http://motscousus.com/stuff/2011-01_dmxP512/basic.pde provided with the library makes 'somethig', but when I catch some values sent by this example and send them to the lights myself, it has no effect...
Thanks!
import dmxP512.*;
import processing.serial.*;
DmxP512 dmxOutput;
int universeSize=5;
boolean DMXPRO=true;
String DMXPRO_PORT="COM3";
int DMXPRO_BAUDRATE=115000;
void setup() {
frameRate(10);
size(245, 245);
dmxOutput=new DmxP512(this, universeSize, false);
dmxOutput.setupDmxPro(DMXPRO_PORT, DMXPRO_BAUDRATE);
}
void draw() {
background(0);
//dmxOutput.reset();
int[] values = new int[5];
if (keyPressed == true){
background(255);
values[0] = 255;
values[1] = 255;
values[2] = 255;
values[3] = 255;
values[4] = 0;
dmxOutput.set(2, values); //channel, values
println(values);
}
}
The example from http://motscousus.com/stuff/2011-01_dmxP512/basic.pde provided with the library makes 'somethig', but when I catch some values sent by this example and send them to the lights myself, it has no effect...
Thanks!
2