Output Pin for DmxSerial

Trying to use DmxSerial on a Nano in place of DmxSimple, but not clear which pin that DmxSerial outputs the DMX signal and how, if possible since my board is already wired from "D2" pin 5 to the MAX485 input pin 4, to programmatically change that pin.

DmxSimple had a "usePin" call to specify the output pin, but that call isn't recognized by DmxSerial, and I can't determine what the default output pin is for DmxSerial.

What are DmxSerial and DmxSimple ?

Default serial output would normally be on pins 0 and 1 unless SoftSerial is used.

DmxSerial and DmxSimple are libraries that create the signal protocol for commercial DMX lighting, allowing an Arduino to function as a DMX Lighting Controller.

DmxSimple has a function to change the output pin but doesn't appear DmxSerial does. Want to try DmxSerial because my project doesn't work for some DMX lights, and DmxSerial appears to better timing capabilities. My circuit board's already hardwired for pin 5 "D2" and would rather not cut traces to change that.

I thought pins 0 and 1 are used for the serial USB connection to the PC and, if used, would prevent programming the Arduino, which, thinking about it, you wouldn't necessarily be programming it while using it!

So does anyone have some background with DmxSerial?
Having a difficult time finding info on what the default output pin is and how to use a different output pin.

hi DMX is a protocol thats bases on RS485, therefore you need a converter from RX and TX to RS485.
you can use the MAX481 or 75176.

on google you can find many pictures how to wire this.

thought pins 0 and 1 are used for the serial USB connection to the PC and, if used, would prevent programming the Arduino, which, thinking about it, you wouldn't necessarily be programming it while using it!

first unplug your circuit board's from the arduino then programm it and put it back on again.

Having a difficult time finding info on what the default output pin is

From DMXSerial.cpp

// DMXSerial - A Arduino library for sending and receiving DMX using the builtin serial hardware port.

Which pin is the "builtin serial hardware port"... TX pin 0?

pin 0 = RX (receive) and pin 1 = TX (transmit)

Thanks for the pin info. Was hoping to change the output pin with DmxSerial but doesn't appear it has that capability. Will need to cut traces :frowning:

Getting compile errors for DmxSerial...

#include <DMXSerial.h>

void setup()  {
  DMXSerial.init(DMXController);
  /* Do init stuff here, runs once per reset or power cycle */
  Serial.begin(9600);         // Initialize the connection to Serial Monitor
  randomSeed(analogRead(0));  // Pick a random seed

  pinMode(13, OUTPUT);
  // Digital inputs need definition here (already have a hardware pullup).
  pinMode(2, INPUT); 
  pinMode(3, INPUT); 

  // DMX output to Tx pin 1 by default for DmxSerial, define maximum number of DMX channels used
  DMXSerial.maxChannel(36);   // Highest DMX channel

} // end setup

and I don't understand the error messages...

C:\Users\rick\AppData\Local\Temp\build3950328564753168963.tmp/core.a(HardwareSerial0.cpp.o): In function __vector_18': C:\Rick\Arduino\Arduino_1_6_4\arduino-1.6.4-windows\arduino-1.6.4\hardware\arduino\avr\cores\arduino/HardwareSerial0.cpp:48: multiple definition of __vector_18'
DMXSerial\DMXSerial.cpp.o:C:\Rick\Arduino\Arduino_1_6_4\arduino-1.6.4-windows\arduino-1.6.4\libraries\DMXSerial-master\src/DMXSerial.cpp:407: first defined here
C:\Users\rick\AppData\Local\Temp\build3950328564753168963.tmp/core.a(HardwareSerial0.cpp.o): In function __vector_18': C:\Rick\Arduino\Arduino_1_6_4\arduino-1.6.4-windows\arduino-1.6.4\hardware\arduino\avr\cores\arduino/HardwareSerial0.cpp:48: multiple definition of __vector_19'
DMXSerial\DMXSerial.cpp.o:C:\Rick\Arduino\Arduino_1_6_4\arduino-1.6.4-windows\arduino-1.6.4\libraries\DMXSerial-master\src/DMXSerial.cpp:296: first defined here
collect2.exe: error: ld returned 1 exit status
Error compiling.

So something in "collect2.exe" errored?

So something in "collect2.exe" errored?

No, it looks like two libraries (HardwareSerial and DMXSerial) trying to use the same interrupt. No surprise really. Try taking out the Serial.begin()

So if both are trying to use the same interrupt, can the interrupt for one be changed? Would still want to have the diagnostic printing capability so would need Serial.begin() to set up the Serial Monitor.

Well, you could delve into the library files and possibly make changes but it is not for the faint hearted.

I sympathise with your desire to use diagnostic printing. You could consider using an Arduino with more serial interfaces, such as a Mega.

rickso234:
I can't determine what the default output pin is for DmxSerial.

Had you thought of looking at the code for the DmxSerial library? That ought to answer the question.

Remember this is open source stuff - you can look at the source, and in fact its a good idea to do so.

MarkT:
Had you thought of looking at the code for the DmxSerial library? That ought to answer the question.

Remember this is open source stuff - you can look at the source, and in fact its a good idea to do so.

Can I refer the honourable gentleman to reply #5 ?