- CTC-DRA-10-R2 (ebay)
- Arduino MEGA 2560
- MagicQ software on Ubuntu
- Chamsys USB to DMX 3 poles link to the shield
- Shield on the same pins as on UNO (the only place you can put the shield I think)
- jumper between 19 RX1 (MEGA) and 3 (DMX SHIELD)
- jumper between 18 TX1 (MEGA) and 4 (DMX SHIELD)
From the side on which you can read "CTC-DRA-10-R2" correctly (the bottom): all the jumper are on the LEFT SIDE. Connections:
- EN
- Slave
- TX-io
- RX-io
this one: https://sourceforge.net/projects/dmxlibraryforar/ version: RDM_alpha3_2
In order to use the Serial on the MEGA for debug and leave the Serial1 for the DMX Shield I changed the Conceptinetics.h file inside the library (~/Arduino/Library/Conceptinetics/Conceptinetics.h)
from:
// Define which serial port to use as DMX port, only one can be
// selected at the time by uncommenting one of the following
// lines
#define USE_DMX_SERIAL_0
//#define USE_DMX_SERIAL_1
//#define USE_DMX_SERIAL_2
//#define USE_DMX_SERIAL_3
to:
// Define which serial port to use as DMX port, only one can be
// selected at the time by uncommenting one of the following
// lines
//#define USE_DMX_SERIAL_0
#define USE_DMX_SERIAL_1
//#define USE_DMX_SERIAL_2
//#define USE_DMX_SERIAL_3
Compiled with arduino IDE 1.18..
#include <Conceptinetics.h>
#define DMX_SLAVE_CHANNELS 10
DMX_Slave dmx_slave ( DMX_SLAVE_CHANNELS );
const int ledPin = 11;
void setup() {
dmx_slave.enable ();
dmx_slave.setStartAddress (5);
// Set led pin as output pin
pinMode ( ledPin, OUTPUT );
Serial.begin(9600);
}
uint8_t dmxValue;
void loop()
{
dmxValue = dmx_slave.getChannelValue(1);
if (dmxValue > 10) {
analogWrite(11,dmxValue);
}
else {
digitalWrite(11, LOW);
}
}