Compile error

Hi,
I have this code:

#include <lib_dmx.h> 
#include <IRremote.h>

#define DMX512 (0) 

int RECV_PIN = 3;
IRrecv irrecv(RECV_PIN);

decode_results results;

void setup() 
{
irrecv.enableIRIn();
pinMode(2,INPUT);
digitalWrite(2, HIGH); 
ArduinoDmx0.set_tx_address(3); 
ArduinoDmx0.set_tx_channels(512); 
ArduinoDmx0.init_tx(DMX512); 
ArduinoDmx0.set_control_pin(11);
}

void IR ()
{if (irrecv.decode(&results)) {
    Serial1.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
  }

void loop()
{ 
  
  
    ArduinoDmx0.TxBuffer[0] = 100;
   
}

End error is:

core.a(HardwareSerial.cpp.o): In function __vector_25': C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:117: multiple definition of __vector_25'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:199: first defined here
c:/program files/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
core.a(HardwareSerial.cpp.o): In function __vector_36': C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:147: multiple definition of __vector_36'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:205: first defined here
core.a(HardwareSerial.cpp.o): In function __vector_51': C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:162: multiple definition of __vector_51'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:211: first defined here
core.a(HardwareSerial.cpp.o): In function __vector_54': C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:177: multiple definition of __vector_54'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:217: first defined here
processing.app.SerialNotFoundException: Serial port 'COM4' not found. Did you select the right one from the Tools > Serial Port menu?
at processing.app.Serial.(Serial.java:191)
at processing.app.Serial.(Serial.java:92)
at processing.app.SerialMonitor.openSerialPort(SerialMonitor.java:207)
at processing.app.Editor.handleSerial(Editor.java:2481)
at processing.app.Editor$17.actionPerformed(Editor.java:665)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Please Help me :frowning:

'irrecv' was not declared in this scope

That's a really big clue.
Were you intending using the IRremote library?
If so, you need to tell the compiler that.

Where did you find that code ?

Is it from this page ?
http://www.deskontrol.net/blog/arduino-four-universes-dmx-512-library/
The "Arduino four universes dmx library version 0.3" ?
Did you see the examples ? Which of the examples did you use ?

I update on TOP :frowning: please help me

I got a really long error similar to this once, I had the board set to an ATTiny instead of an Uno. Check your board, and make sure your IDE, libraries, and code are up-to-date.

I solve this with softwareserial but i have new problem :slight_smile:
http://forum.arduino.cc/index.php?topic=222396.0

core.a(HardwareSerial.cpp.o): In function __vector_25' C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:117: multiple definition of __vector_25'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:199: first defined here
c:/program files/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
core.a(HardwareSerial.cpp.o): In function __vector_36': C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:147: multiple definition of __vector_36'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:205: first defined here
core.a(HardwareSerial.cpp.o): In function __vector_51': C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:162: multiple definition of __vector_51'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:211: first defined here
core.a(HardwareSerial.cpp.o): In function __vector_54': C:\Program Files\Arduino\hardware\arduino\cores\arduino/HardwareSerial.cpp:177: multiple definition of __vector_54'
Dmx\lib_dmx.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\Dmx/lib_dmx.cpp:217: first defined here

? :astonished:

Thank you for your help.

Come on give us a chance. What code is giving these errors.

#include <lib_dmx.h> 
#include <IRremote.h>
#define DMX512 (0) 
int RECV_PIN = 4;
IRrecv irrecv(RECV_PIN);

decode_results results;

void setup() 
{
Serial.begin(9600);
irrecv.enableIRIn();
ArduinoDmx1.set_tx_address(3); 
ArduinoDmx1.set_tx_channels(512); 
ArduinoDmx1.init_tx(DMX512); 
ArduinoDmx1.set_control_pin(18);
}

void loop()
{ 
  if (irrecv.decode(&results)) {
    Serial.println(results.value);
    irrecv.resume(); 
  }
 switch(results.value)
   {
  case 16750695:  
    ArduinoDmx1.TxBuffer[0] = 100;
    delay(100);
    break;   
   }
}