Compile error

HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

(.text+0x0): multiple definition of `__vector_18'

libraries\grbl\serial.c.o (symbol from plugin):(.text+0x0): first defined here

That is the error tha shows off.My code is :

#include <grbl.h>
#include <Wire.h>
#include <I2C_Anything.h>

const byte MY_ADDRESS = 42;

void setup() 
{
  Wire.begin (MY_ADDRESS);
  Serial.begin (115200);
  Wire.onReceive (receiveEvent);
}  // end of setup

volatile boolean haveData = false;
volatile float fnum;
volatile long foo;

void loop() 
{
  if (haveData)
    {
    Serial.print ("Received fnum = ");
    Serial.println (fnum);  
    Serial.print ("Received foo = ");
    Serial.println (foo);  
    haveData = false;  
    }  // end if haveData

}  // end of loop

// called by interrupt service routine when incoming data arrives
void receiveEvent (int howMany)
 {
 if (howMany >= (sizeof fnum) + (sizeof foo))
   {
   I2C_readAnything (fnum);   
   I2C_readAnything (foo);   
   haveData = true;     
   }  // end if have enough data
 }  // end of receiveEvent

I think that happened when i inserted the ( #include <grbl.h>) grbl library. Any solutions?

I think that happened when i inserted the ( #include <grbl.h>) grbl library. Any solutions?

Don’t do that. 8)

Post links to the libraries you are using.

The linker (not the compiler) is telling you that you are trying to use the same resource for two different purposes. Of course, that is not possible.

I need grbl because i want to run G codefrom a text. :confused:
How can i post links for the libraries that i use?

You should understand grbl before you try to use it. The grbl firmware is not something that you add to your code. It is a stand alone gcode parser and control firmware. And you can't just send a text file to grbl. There is a certain handshaking protocol to send gcode to grbl.

Universal gcode sender and bCNC are 2 popular programs used to send your gcode to grbl.

I want to send the txt file via the Master Arduino and i want the slave to execute it.Can it be done without using grbl on slave? If so please guide me.

I want to send the txt file via the Master Arduino and i want the slave to execute it.

That is certainly possible.

Can it be done without using grbl on slave?

What is the slave controlling? Stepper motors? You could write your own gcode parser and control software.

OP - you now have 3 threads on the subject of master/slave communication