Tags: Dan Shiffman, dmx, dmxP512, enttec, hardware, Henri David, installation, interface, library, lighting, marius-watz, prime, processing.org
To be revisited: Prime light installation
I am currently working on a solo show for ROM Art + Architecture in Oslo under the title “Extrusion”, opening on March 11th. The show will focus on physical installations, a bit of a departure from my software works that I’m very excited about.
One of the pieces will be a new version of my light installation Prime, a public art commission for the Bybanen light rail system in Bergen last year. The Bybanen version uses LED lighting elements and electric relays, intended to be stable for a minimum of 5 years in the rough environment of a subterranean tunnel. The new version will use fluorescent tubes and computer-controlled switching via a DMX-512 lighting control interface.
Fortunately there are several USB interfaces for DMX control, as well as a recently released Processing library by Henri David titled dmxP512. Thanks to the generous assistance of Dan Shiffman I was able to test my interface with dmxP512 today. I’m very pleased to say that both the USB box and David’s library worked without a hitch, literally working perfectly on the very first attempt.
Even given the simplicity of the DMX standard it’s rare that anything works that easily, let’s hope I don’t jinx myself by writing it publicly. In any case, the exceedingly simple code I used is listed below, based on the sample code provided with the dmxP512 lib. Happy hacking, my thanks to Henri David for the library!
To run this example you’ll need Henri David’s dmxP512 library and a USB DMX interface like the ENTTEC DMX USB Pro ($151).
To set a new value for any given DMX channel, simply call DmxP512.set(dmxChannel,newValue).
import dmxP512.*;
import processing.serial.*;
DmxP512 dmxOutput;
String DMXPRO_PORT="COM4";
int DMXPRO_BAUDRATE=115000;
void setup() {
size(200,200);
println(Serial.list());
DMXPRO_PORT=Serial.list()[0];
println("DMXPRO_PORT "+DMXPRO_PORT);
dmxOutput=new DmxP512(this,128,false);
dmxOutput.setupDmxPro(DMXPRO_PORT,DMXPRO_BAUDRATE);
}
void draw() {
background(0);
int cnt=(int)((float)millis()/100f)%255;
println("cnt "+cnt);
// output on DMX channel 2
dmxOutput.set(2,cnt);
}





Hey Im a old follower of your blog.
I worked with Enttec device an I can say that although it is very durable and easy to use you dont need to pay that much money to a DMX device.You can check my blog here and you can find a good example of Arduino DMX interface based on tinker.it library.
http://rdmyldrmr.weebly.com/electronicsoftware-prototypes.html
Thanks for the link, I don’t work much with Arduino so the ENTTEC / dmxP512 combination was a perfect solution for me. Someone else sent me this link to another Arduino DMX Shield: http://learn.plankman.com/superDmxShield/
You might find this interesting, along similar lines of your work.
http://www.nevadaart.org/exhibitions/detail?eid=172
Just for your reference
http://www.my-semi.com/content/news/news_mean.aspx?id=14
http://www.youtube.com/watch?v=zOHUceuDaEw
Anyway, nice project.