Using DMX Shield and NeoPixel Strips

I intend to use an Arduino Uno and the DMX Shield by "Conceptinetics" to achieve a DMX controllable LED strip.

I am using the Conceptinetics DMX library and the NeoPixel Library

I see this as a popular way to control Digital LED Strip segments. The DMX of course makes it easy to connect with other fixtures. Using software such as MadMapper one can easily control these strips in a variety of ways.

However, I do not see any comprehensive thread that works through the aspects of creating this type of custom LED strip fixture.

The main hurdle seems to be how to read a list of DMX messages and then possibly fill a list of setPixel - etc.

I aim to create this and document along the way. I will have some questions and I look forward to engaging with the friendly folks here.

Thanks,

I have hit a snag where the PIN 13 LED will not light up in response to a DMX signal.

I have confirmed my computer is sending the correct DMX values as a working fixture responds properly.

I am wondering why this may be? Perhaps the pins are in the wrong place, the code is out of order?

#include <Conceptinetics.h>

// Number of slave DMX channels
#define DMX_SLAVE_CHANNELS   10 

// Configure a DMX slave controller
DMX_Slave dmx_slave ( DMX_SLAVE_CHANNELS );

const int ledPin = 13;

// the setup routine runs once when you press reset:
void setup() {             

  // Enable DMX slave interface and start recording
  // DMX data
  dmx_slave.enable ();  

  // Set start address to 1, this is also the default setting
  // You can change this address at any time during the program
  dmx_slave.setStartAddress (1);

  // Set led pin as output pin
  pinMode ( ledPin, OUTPUT );
}

// the loop routine runs over and over again forever:
void loop() 
{

  // EXAMPLE DESCRIPTION
  //
  // If the first channel comes above 50% the led will switch on
  // and below 50% the led will be turned off

  // NOTE:
  // getChannelValue is relative to the configured startaddress
  if ( dmx_slave.getChannelValue (0) > 127 )
    digitalWrite ( ledPin, HIGH );
  else
    digitalWrite ( ledPin, LOW );


}

Can you do any error checking and report back what you got?

I don't know much about DMX, but does it continuously send the channel value or just send it once?

If once, your led would blink briefly during one cycle of loop and be off the rest of the time.

A serial print of the getChannelValue() and a delay might solve things.

I would be happy to perform an error check.

I believe it sends the value once. However, I have a program where I can send messages - on/off, color, etc - and that does not register a new LED blink. I tested this program with a working DMX fixture and it does send correctly. So I believe it is after the software and into the Arduino side of things.

How can I use a println() here? I want to see it on the console not read a value from a pin. Is there one to use on the console side?

Also, here is a video description of the problem: http://youtu.be/i5IQNTGWybs

#include <Conceptinetics.h>

// Number of slave DMX channels
#define DMX_SLAVE_CHANNELS   10 

// Configure a DMX slave controller
DMX_Slave dmx_slave ( DMX_SLAVE_CHANNELS );

const int ledPin = 13;

// the setup routine runs once when you press reset:
void setup() {             

  // Enable DMX slave interface and start recording
  // DMX data
  dmx_slave.enable ();  

  // Set start address to 1, this is also the default setting
  // You can change this address at any time during the program
  dmx_slave.setStartAddress (1);

  // Set led pin as output pin
  pinMode ( ledPin, OUTPUT );
}

// the loop routine runs over and over again forever:
void loop() 
{

  // EXAMPLE DESCRIPTION
  //
  // If the first channel comes above 50% the led will switch on
  // and below 50% the led will be turned off

  // NOTE:
  // getChannelValue is relative to the configured startaddress
  if ( dmx_slave.getChannelValue (1) > 127 )
    digitalWrite ( ledPin, HIGH );
  else
    digitalWrite ( ledPin, LOW );

  delay(500);
  Println(dmx_slave.getChannelValue (1));

}

Didn't end up going this route with the project but I will check the project soon and post a working version

I’m trying to do this exact same thing, using the conceptinetics shield & library and the fastled library. Now, I’ve gotten a bit further, but I have problems. I can definitely read dmx, but not accurately.

I’ve been trying to use a for loop to go through a strip of 60 pixels, and for each pixel reading 3 dmx values for the red, green and blue values, incrementing a variable each time to keep track of which DMX channel I should read next. To put it simply, it doesn’t work. If I instead just look for one set dmx channel I can happily dim the whole strip at once, so I think the problem is in the way I’ve been incrementing the dmx value I look at. It seems to me there must be a more elegant way to do it, can anyone help?

A for loop seems a bit clunky to me, I feel like what I should be doing is using interrupts and updating pixels as soon as I receive new DMX data, but I’m very new to Arduino and can’t wrap my head around how to do that yet.