mathertel / DMXSerial

An Arduino library for sending and receiving DMX packets.
BSD 3-Clause "New" or "Revised" License
328 stars 78 forks source link

individual DMX_USE_PORT1 #73

Open GralfR opened 1 year ago

GralfR commented 1 year ago

I had conflicts using DMXserial with other libraries and read about the #define DMX_USE_PORT1, which helped me developing on an Arduino MEGA 256. So I uncommented the line in the library.

Unfortunately I had no success defining the DMX_USE_PORT1 in my script. How can I do that? I tried before and after including DMXserial. It would be great to be able to select the port inside the script instead of changing the library and getting errors if compiling other scripts for other devices which have no problem using UART0 for DMX.

What did I miss?

Thanks

novski commented 4 months ago

same on my side. If I do:

#include <DMXSerial.h>
#define DMX_USE_PORT1

i get:

HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':
(.text+0x0): multiple definition of `__vector_25'
/private/var/folders/sf/yfrzcwy91jz9m0cc0y82g_k00000gn/T/arduino/sketches/093AFE6F8A5362C3CCD3C0EF28B9407D/libraries/DMXSerial/DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':
(.text+0x0): multiple definition of `__vector_26'
/private/var/folders/sf/yfrzcwy91jz9m0cc0y82g_k00000gn/T/arduino/sketches/093AFE6F8A5362C3CCD3C0EF28B9407D/libraries/DMXSerial/DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

Seams like the redefinition does not been recognized by the compiler.