# Communicate DMX with zigbee

**URL:** <https://forums.digi.com/t/communicate-dmx-with-zigbee/13639>\
**Category:** XBee & XBee Gateway\
**Tags:** arduino-xbee, shield, dmx, dimex, zigbee\
**Created:** [September 24, 2014, 2:05am UTC](https://forums.digi.com/t/communicate-dmx-with-zigbee/13639 "2014-09-24T02:05:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caterpillarrrr](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@caterpillarrrr](https://forums.digi.com/u/caterpillarrrr)\
**Post date:** [September 24, 2014, 2:05am UTC](https://forums.digi.com/t/communicate-dmx-with-zigbee/13639/1 "2014-09-24T02:05:48Z")

</div>

I’m trying to communicate DMX with Xbee shields. I’ve found online that there is a DiMex shield that acts as a transceiver between DMX and Xbee but i can’t seem to find where to buy the product.  
Here’s the link to the DiMex: [https://code.google.com/p/sjunnesson/wiki/DiMeX](https://code.google.com/p/sjunnesson/wiki/DiMeX)

Also, I am trying to decode what my DMX controller says via Xbee because I can’t seem to Serial.print anything using the Conceptinetics.h code. When I’ve combined the code with the Xbee code, tons of errors pop up. Below is the code

#include  
#include  
#include

#include

//  
// CTC-DRA-13-1 ISOLATED DMX-RDM SHIELD JUMPER INSTRUCTIONS  
//  
// If you are using the above mentioned shield you should  
// place the RXEN jumper towards G (Ground), This will turn  
// the shield into read mode without using up an IO pin  
//  
// The !EN Jumper should be either placed in the G (GROUND)  
// position to enable the shield circuitry  
// OR  
// if one of the pins is selected the selected pin should be  
// set to OUTPUT mode and set to LOGIC LOW in order for the  
// shield to work  
//

//  
// The slave device will use a block of 10 channels counting from  
// its start address.  
//  
// If the start address is for example 56, then the channels kept  
// by the dmx\_slave object is channel 56-66  
//  
#define DMX\_SLAVE\_CHANNELS 10

//  
// Pin number to change read or write mode on the shield  
// Uncomment the following line if you choose to control  
// read and write via a pin  
//  
// On the CTC-DRA-13-1 shield this will always be pin 2,  
// if you are using other shields you should look it up  
// yourself  
//  
///// #define RXEN\_PIN 2

// Configure a DMX slave controller  
DMX\_Slave dmx\_slave ( DMX\_SLAVE\_CHANNELS );

// If you are using an IO pin to control the shields RXEN  
// the use the following line instead  
///// DMX\_Slave dmx\_slave ( DMX\_SLAVE\_CHANNELS , RXEN\_PIN );

XBee xbee = XBee();  
// Create an array for holding the data you want to send.  
uint8\_t payload[] = { 57 , 111 };

XBeeResponse response = XBeeResponse();  
ZBRxResponse rx = ZBRxResponse();  
ModemStatusResponse msr = ModemStatusResponse();  
ZBTxStatusResponse txStatus = ZBTxStatusResponse();

// Specify the address of the remote XBee (this is the SH + SL)  
XBeeAddress64 addr64 = XBeeAddress64(0x0013a200, 0x40aa1468);

// Create a TX Request  
ZBTxRequest zbTx = ZBTxRequest(addr64, payload, sizeof(payload));  
int zz=0;  
// the setup routine runs once when you press reset:  
void setup() {

// Enable DMX slave interface and start recording  
// DMX data  
dmx\_slave.enable ();  
Serial.begin(9600);  
xbee.begin(Serial);  
[//xbee.setSerial](https://xbee.setSerial)(Serial);  
Serial.println(“ready to transmit”);  
// 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

}

// the loop routine runs over and over again forever:  
void loop()  
{  
zz= dmx\_slave.getChannelValue (1);  
//  
// 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  
xbee.readPacket();  
if (xbee.getResponse().isAvailable()) {  
[//Serial.print](https://Serial.print)(“router requesting”);  
}else{  
[//Serial.print](https://Serial.print)(“nothing from router”);  
}  
xbee.send(zbTx);  
Serial.println(“Infinitus”);  
delay(1000);

}

Help!!!☹  
P.S.: REALLY VERY new to programming so I apologize if this is a simple issue.

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [November 13, 2014, 2:02pm UTC](https://forums.digi.com/t/communicate-dmx-with-zigbee/13639/2 "2014-11-13T14:02:37Z")

</div>

I would suggest looking at the following:

[http://electronics.stackexchange.com/questions/85271/dmx-serial-first-over-xbee-pro-module-with-arduino](http://electronics.stackexchange.com/questions/85271/dmx-serial-first-over-xbee-pro-module-with-arduino)

[https://forum.sparkfun.com/viewtopic.php?f=13&amp;t=29299](https://forum.sparkfun.com/viewtopic.php?f=13&amp;t=29299)
