I have an issue with multiple library conflicts....
I started with a Mega2560p. Any DMX library I install (DMXSerial, DMXSerial2, DMXSimple) conflicts with the serial ports of the Mega. Therefore rendering any other serial comms impossible due to vector conflicts.
This appears to be a well known issue. When I try to use any other means of serial comms, you get the error....
*HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':* *(.text+0x0): multiple definition of `__vector_25'* *libraries\DMXSerial\DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here* *c:/users/steve/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions* *HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':* *(.text+0x0): multiple definition of `__vector_26'* *libraries\DMXSerial\DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here* *collect2.exe: error: ld returned 1 exit status* *exit status 1* *Error compiling for board Arduino Mega or Mega 2560.*
So... in desperation, I moved the whole project over to a Teensy 3.2. I know from experience that the DMX libraries do play together with other serial devices on the Teensy.
I am trying to add one of these voltage/amperage modules:
These have examples of software and hardware comms, but they will not play with any Arduino due to this (apparently well known) Vector clash issue.
But now the Teensy will not let play with this module, you get the error....
C:\Users\steve\Documents\Arduino\libraries\PZEM-004T-v30-master\PZEM004Tv30.cpp:54:23: error: conflicting declaration 'HardwareSerial Serial' extern HardwareSerial Serial; ^ In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:54:0, from C:\Users\steve\AppData\Local\Temp\arduino_build_412065/pch/Arduino.h:6, from C:\Users\steve\Documents\Arduino\libraries\PZEM-004T-v30-master\PZEM004Tv30.h:41, from C:\Users\steve\Documents\Arduino\libraries\PZEM-004T-v30-master\PZEM004Tv30.cpp:23: C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/usb_serial.h:124:25: note: previous declaration as 'usb_serial_class Serial' extern usb_serial_class Serial; ^ C:\Users\steve\Documents\Arduino\libraries\PZEM-004T-v30-master\PZEM004Tv30.cpp: In destructor 'PZEM004Tv30::~PZEM004Tv30()': C:\Users\steve\Documents\Arduino\libraries\PZEM-004T-v30-master\PZEM004Tv30.cpp:118:22: warning: deleting object of abstract class type 'Stream' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor] delete this->_serial; ^
Any ideas how to get past either of these issues?
The first DMX libraries blocking the rest of the serial ports seems to be well known (and not fixed).
The second conflicting declaration error on the Teensy I do really understand