How to use TinkerKit DMX shield in UART mode with deskontrol DMX library.
With this shield you can use 1 DMX universe.
In order to use the TinkerKit DMX shield in UART mode, you need to move this bridges: DE-ENABLE, RE-ENABLE, TX-SELECT, RX-SELECT to pads 2 and 3. (the oposite as come by default)
To do this, remove the resistors R2, R4, R5, R6 and make a soldering between pads 2 and 3 of each option, or move resistors to oposite pads.
You can use deskontrol DMX library without any modifications.
in setup() function of your project add:
pinMode(2, OUTPUT);
pinMode(5, OUTPUT);
——————————————
For receive DMX:
——————————————
in setup() function of your project add:
// because the shield uses two output pins from arduino to control the MAX485
digitalWrite(2, LOW); // control of 485 direction (input)
digitalWrite(5, LOW); // control of 485 direction (input)
ArduinoDmx0.set_control_pin(-1); // disable control from library *** needed ***
// your code
ArduinoDmx0.set_rx_address(1); // set rx0 dmx start address
ArduinoDmx0.set_rx_channels(100); // number of rx channels
ArduinoDmx0.init_rx(DMX512); // starts universe 0 as rx
——————————————
For transmit DMX:
——————————————
in setup() function of your project add:
// because the shield uses two output pins from arduino to control the MAX485
digitalWrite(2, HIGH); // control of 485 direction (output)
digitalWrite(5, HIGH); // control of 485 direction (output)
ArduinoDmx0.set_control_pin(-1); // disable control from library *** needed ***
// your code
ArduinoDmx0.set_tx_address(1); // set tx0 dmx start address
ArduinoDmx0.set_tx_channels(100); // number of tx channels
ArduinoDmx0.init_tx(DMX512); // starts universe 0 as tx
*****************************************************************
IMPORTANT:
To program the Arduino via USB will be necessary to remove the DMX shield, and put it back once programmed!
*****************************************************************
Regards.
Were do I find the program for running the dmx shield.I need to down load it.Thanks
Hi John.
Tinkerkit DMX library is here: http://www.tinkerkit.com/reference/
Deskontrol DMX library is here: http://blog.deskontrol.net/arduino-four-universes-dmx-512-library/
Regards.
Hi I am trying to get the Uno and the tinkerkit shield to work with your library. I have a small DMX board hooked up to the input of the shield. I am trying to code the sketch to read the state of a channel, and if it is above a certain value, will cause the LED on pin 13 to turn either on or off. I haven’t been able to get any response from the LED when I play with faders on my board.
Perhaps something might stand out to you as to where I might be going wrong…
Thanks in advance 🙂 And for all of your great work here.
Sorry for the mess. Here is the plaintext
#include <lib_dmx.h>
// dmx test led
const int ledDmxPin = 13;
int ch1 = 0;
void setup() {
pinMode(13, OUTPUT);
// because the shield uses two output pins from arduino to control the MAX485
digitalWrite(2, LOW); // control of 485 direction (input)
digitalWrite(5, LOW); // control of 485 direction (input)
ArduinoDmx0.set_control_pin(-1);
ArduinoDmx0.set_rx_address(1); // set rx0 dmx start address
ArduinoDmx0.set_rx_channels(12); // number of rx channels
ArduinoDmx0.init_rx(0); // starts universe 0 as rx
}
void loop() {
ch1 = ArduinoDmx0.RxBuffer[1];
if(ch1 < 100)
{
digitalWrite(ledDmxPin, LOW);
}
else
{
digitalWrite(ledDmxPin, HIGH);
}
}
Hi.
Are you testing only with channel 1?, you are receiving channel 2
RX buffer for DMX channel 1 is ArduinoDmx0.RxBuffer[0]
Also you need to change shield bridges as described here: http://blog.deskontrol.net/using-tinkerkit-dmx-shield-with-deskontrol-dmx-library/
Regards.