Dmx generict control strobe

I just start using openFrameworks to control DMX. My DMX interface just arrive. I’m using “ofxGenericDmx.h” everything seems to be working. But i don’t really know how the data flow works. I’m triying to control a strobe atomic 3000. The sample code is for controlling a RGB light:

 //asign our colors to the right dmx channels
    dmxData_[1] = int(red);
    dmxData_[2] = int(green);
    dmxData_[3] = int(blue);

I guess the array is the kind if the “universe” i whatever set of light you want to program ,if i’m right dmxData_[1] is channel one, let’s say i have the strobe in channel one should i send a 1 to turn one and 0 to turn off? or values go 0 to 250?

To my understanding DMX is just a series of 512-bytes per universe. With a range of 0-255;
So if you’ve got a RGB-led listening on channel 13, then
[13] = (unsigned char) r;
[14] = (unsigned char) g;
[15] = (unsigned char) b;
So with one universe you can control multiple lights, just send the signal to all of them, and they pick what they need.
In this case you’ve got a strobe which listens to address x (set it with the dip-switch on the strobe), and what every channel controls can be found in the manual, page 23 :slight_smile:

Cool, thanks. Now i have an idea but know i’m confused in how to do it using openFrameworks if you have an idea can you give me an exmaple? thanks.

My only experience with OF and DMX is with ofxDmx, which is a bit different from ofxGenericDmx.
I had a look at the ofxGenericDmx addon and I’m referring to the _RawDmxExample

This is the magic function:
dmxInterface_->writeDmx( dmxData_, DMX_DATA_LENGTH );
Which simply passes an unsigned char array, and the length of it.

So, if you’ve set your strobe to channel 4 (on the strobe itself) and set it to 1DMX mode, then you can do things like this:

unsigned char dmxData[10]; // The 10 is just a random size
memset(dmxData, 0, 10);
dmxData[4] = 6 // Slowest strobe frequency
dmxInterface_->writeDmx( dmxData_, 10);

dmxData[4] = 249 // Fastest strobe frequency 
dmxInterface_->writeDmx( dmxData_, 10);

dmxData[4] = 250 // Continuous “Blinder” effect
dmxInterface_->writeDmx( dmxData_, 10);
1 Like

Thanks! i will get a strobe today to test.

Hi! i just get the strobe and i got it working, but the data i put here dmxData[4] = 6 // Slowest strobe frequency
is the instensity of the strobe and is blinking randomly do you know a way to control the speed?

As you can see in the manual, it has 2 DMX modes (one for 1 channel, one for 3-4 channels).
When using the 3-4 channel mode, channel 1 refers to the intensity.
In this mode channel 3 is the flash rate.