|
Video walkthrough now availableDMX controlled lights and visual effects are easily available from DJ or theatrical suppliers. This library gives you a simple way to drive spot lamps, floods, wall washers, lasers, smoke machines and more from a normal Arduino using DMX. If you can use analogWrite() to dim an LED, you will have no problems using DmxSimple to control something much bigger and brighter. The software output is compatible with the Tinker.it! DMX shield, or DIY DMX circuits. DmxSimple does some fancy stuff behind the scenes, so there is no need to worry about DMX frames, retransmissions and channel orders. Specify which channels you want at which value, and the library will handle everything else for you. CompatibilityDmxSimple is compatible with all known Arduinos including the Mega. The following Arduinos are recommended, as they support both DmxSimple and the Tinker.it! DMX shield: Arduino Mega, Arduino Duemilanove 328, Arduino Duemilanove, Arduino Diecimila, Arduino Bluetooth, Arduino Pro (5V version only), Arduino NG, Arduino Serial. InstallationDownload the archive. Extract to (arduino install)/hardware/libraries/DmxSimple . Restart Arduino so it recognises the library. Example codeThe example code is also built into the library. Open Arduino, and look under File > Sketchbook > Examples > Library-DmxSimple. Function calls
DmxSimple communityWe now have a group on Google Groups. Get assistance starting with DMX, or show off your installations. Library limitationsTimer 2 is used. Due to the small amount of RAM on 168 and Mega8 Arduinos, only the first 128 channels are supported. Arduinos with processor sockets can easily be upgraded to a 328 to control all 512 channels. Upgrade notesThe original version 1 of DmxSimple used a file "DmxInterrupt.h". This has since been removed. To upgrade old sketches, remove the #include "DmxInterrupt.h" line. When upgrading the library from v1, delete all the old files before copying the contents of the new archive. |
► Sign in to add a comment
Is it possible to make it work along with other libraries that uses Timer2?
I found this wonderful IRRemote library http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html and I think that DMX+IRRemote would be a wonderful combo, but both the libraries use Timer2 (in a very different way) and I wonder if it would be possible to make them work together...
Here's a first stab at using this library to control DMX via Firmata:
#include <Firmata.h> #include <DmxSimple.h> void dmxWriteCallback(byte pin, int value) { // analogWrite is 10-bit, but DMX is 8-bit, so reduce the value DmxSimple.write(pin, value/4); } void setup() { Firmata.setFirmwareVersion(0, 1); Firmata.attach(ANALOG_MESSAGE, dmxWriteCallback); Firmata.begin(57600); // Firmata only supports 16 analog pins, so limit the DMX output DmxSimple.maxChannel(16); } void loop() { while(Firmata.available()) { Firmata.processInput(); } }DMX Shield available to purchase from SK Pang Electronics http://www.skpang.co.uk/catalog/product_info.php?cPath=140_142&products_id=663
I am having getting this working well in Arduino 17 or 18. Has anyone tried it with either of these builds. I have verified my hardware with a different DMX out code set, but would prefer this library for ease.
Thanks - Chuck
Does anyone know how to send messages with Firmata from Pure Data to an Arduino to control the DMX lights?
I have lamp with red in pin 3, white in pin 4 and the copper braid into the ground. Arduino Duemilanove is loaded with SerialToDMX (but I've also tried StandardFirmata?). I'm just not sure of the syntax of messages to come from Pd?
Thanks. Y
Just in case this interests anyone, I've now solved this problem and have made a video tutorial on how to do hook this up, along with a few examples of usage possibilities.
Pt 1: http://www.youtube.com/watch?v=3Q4hLA7YM7c Pt 2: http://www.youtube.com/watch?v=sq33uOGq_l0
I need to alter DMXsimple to give a 500us break instead of the usual 88us. I have a light fitting that requires this.
heres the email from the manufacturer:
The problem is the "SPACE" for BREAK of the TRISTAR-RGB-DMX, which is 500. The standard DMX "SPACE" for BREAK is 88~144, but some DMX controllers handle a wide range of from 88~1,000.
So at this point, unless we can get our engineers to change the "SPACE" for BREAK, you need a DMX controller than can handle 500.
Thanks
Cheers for the excellent technical diagnosis, jnrhacksaw. I'm inclined to keep the default break period to 88us, but it makes sense to make it easily adjustable for less compatible lights. I'll get coding. Watch this space...
Does it work on Arduino Mega2560?
Hello, Peter Knight I need such a DMX-Shield, what does it cost me, and could You sent it to Germany ? please response to me to funnyking@live.de :)
Thaks
analogWrite is only 8-bit, analogRead is 10-bit
Does it work on Arduino Mega2560?
SK Pang module works with a 2560, you just need to make sure the pins line up correctly - not hard, as they are labeled on both boards.
I have an Arduino UNO, does it support DmxSimple and the Tinker.it? Also can I use the shield on the Arduino UNO?
I have to admit I was too quick to give my above statement. I haven't managed to get the arduino and the shield to control my dmx lamp properly. I have tried the SerialtoDMX sketch, but I get NO response from my DMX light. I've followed the directions in Yuli's video, and my 2560 is blinking when I send a serial message, but nothing else happens after that.
Is the shield supposed to blink also on incoming serial messages? LED1 is lit all the time, otherwise no lifesigns from the shield. Is that normal?
since arduino 1.0 wiring.h is not presend, so this library will not upload :(
Hi i get the following error's when compiling - any ideas as to why and how i can fix this?
C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:11:20: error: wiring.h: No such file or directory C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp: In function 'void dmxBegin()': C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:57: error: 'digitalPinToPort' was not declared in this scope C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:57: error: 'portOutputRegister' was not declared in this scope C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:58: error: 'digitalPinToBitMask' was not declared in this scope C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:61: error: 'OUTPUT' was not declared in this scope C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:61: error: 'pinMode' was not declared in this scope C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp: In function 'void dmxWrite(int, uint8_t)': C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:183: error: 'max' was not declared in this scope C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp: In function 'void dmxMaxChannel(int)': C:\Program Files\arduino-1.0\libraries\DmxSimple\DmxSimple.cpp:194: error: 'min' was not declared in this scope
I have managed to get SimpleDMX to work with arduimo 1.0 and Arduino Uno (at least the FadeUp example).
It seems like the functions and definitions that used to be in wiring.h has moved in to Arduino.h (causing the compile errors above). Simply open the DMXSimple.cpp file, remove the #include wiring.h line and add #include "Arduino.h"
Disclaimer: First time playing with Arduino :)
Please help mi dmx tester say my dmx shiel dont work y want to use ipad 2 dmx ulate an arduino uno ethernet shield and dmx shield al is ok , compiler ok but the dmx shield not work the dmx shield is a sk pang dmx shield , help