DMX Code

Hi, I'm having some problems with a project I'm trying to do for school. The tech department needs a very small lighting fixture, basically just a few LEDs in a box, that can be DMX controlled. And it has to be tiny. So I looked to arduino to try and come up with a solution. I found a page on the site with some examples of DMX receiving code, and a way to hook everything up, but I am having trouble understanding everything it is telling me, both in the tutorial page, and the programmer error messages. Before I get into the specifics, let me start off by saying that I know extremely little about programming language. I have done some sketches with the arduino before, and with xbees, but nothing having to do with external Transceiver chips or DMX. The first of my problems is that I don't know how to access the HardwareSerial.cpp file the tutorial wants me to edit. This seems like it should be a simple thing to do, but I don't know my way around the compiler and all its files very well. Second, it talks about swapping a digit used in the register names (USART0, or USART1) it says which one is correct is dependent on the hardware being used. I am thoroughly confused by this as I don't see anything relating to register names in the data sheets of either the arduino or the DMX Transceiver. And last, it also says to set the RE pin on the Transceiver to LOW/GND. I know how to do that on the arduino, but how do I talk to the chip?

The tutorial I am reading from is located here: http://arduino.cc/playground/DMX/Ardmx

Any help would be greatly appreciated!!!

Thanks, Riley Kolus

Hi Riley, If this helps a little...

The first of my problems is that I don't know how to access the HardwareSerial.cpp file the tutorial wants me to edit.

/Applications/Arduino.app right-click and choose "open package" /Contents/Resources/Java/hardware/arduino/cores/arduino/ here you find HardwareSerial.cpp

open it with a text-editor

Pieter

Those directions are for a Mac. You need to find where the Arduino software is installed on your system (its different for Mac, Linux and Windows). Then the hardware/arduino/core/arduino path will get you to the built-in libraries.

If you are going to edit any built in libraries its much better to take a copy, put it in your sketchbook/libraries/ directory and rename it. You'll need the .cpp and .h file, perhaps rename them MyHardwareSerial.h/cpp

That way you can't break your system.

cool, thank you very much. I would also like to integrate xbees into my plan and make the system wireless. Do xbees only need transmit and receive pins? or are there more on the board that I need to sacrifice for that? And do you know of any good starter tutorials on coding one arduino for transmitting a received signal, and one for acting on it? (master/slave but I don't know how the dmx code I already have will affect this)

Do xbees only need transmit and receive pins?

Aside from power and ground, yes.