Cannot send data via i2c to master raspberry pi

    Serial.print("Send num bytes: ");
    Serial.println(numBytes);

Never use the Serial object in interrupt context (both I2C handling routines are called in interrupt context)! It may freeze because it's waiting endlessly for the UART interrupt to be called.

mortommy:
Hi Pylon,
yes i modified the variables declaration as:

byte  volatile  command = 0;

byte  volatile  txTable[4];                              //for sending data over I2C
byte  volatile  rxTable[4];                              //for sending data over I2C
bool  volatile  newDataAvailable;




ad some news here! Removing the check on command I get data on raspberry pi. Do you know why? But I get always [0,255,255,255] :confused: but it is a step forward.

Interesting that the compiler accepted that code, usually the volatile keyword has to be in front of the type declaration. I don't know what the compiler makes with your version. Try to set the volatile keyword in front of the type.