thanks for reply, the first thing i clear to you that i am not using xbee , i communicate it through wire medium, secandly can you please tell me how to switch to API mode?
below is the code for the master i am using
#include <SoftwareSerial.h>
SoftwareSerial serialSlave1(3, 2);
int indexSlave1=0;
byte valSlave1[17];
void setup()
{
Serial.begin(115200);
serialSlave1.begin(28800);
}
float qSalve1[4],
byte * f_1Slave1 = (byte *) &qSalve1[0];
byte * f_2Slave1 = (byte *) &qSalve1[1];
byte * f_3Slave1 = (byte *) &qSalve1[2];
byte * f_4Slave1 = (byte *) &qSalve1[3];
void loop()
{
while(1<serialSlave1.available())
{
byte ch = serialSlave1.read();
valSlave1[indexSlave1]=ch;
indexSlave1++;
if(ch=='\n'){ indexSlave1 = 0;}
}
for(int fs=0;fs<4;fs++) f_1Slave1[fs]= valSlave1[fs];
for(int fs=0;fs<4;fs++) f_2Slave1[fs]= valSlave1[fs+4];
for(int fs=0;fs<4;fs++) f_3Slave1[fs]= valSlave1[fs+8];
for(int fs=0;fs<4;fs++) f_4Slave1[fs]= valSlave1[fs+12];
Serial.print(qSalve1[0],4);
Serial.print(",");
Serial.print(qSalve1[1],4);
Serial.print(",");
Serial.print(qSalve1[2],4);
Serial.print(",");
Serial.print(qSalve1[3],4);
delay(15);
}