 
       else {
         Serial.println(F("done"));
+        //dataXB="";
+        for (unsigned char m=0;m<160;m++){
+          dataXB[m]=0;
+        }
+        //sprintf(dataXB,"",sizeof(""));
+        digitalWrite(trigForDue, LOW);
+        return;
       }
     }
   }


int xbFlag=0;
char dataXB[160];
/*********************/

// SH + SL Address of receiving XBee

String sec;
char *xbsend[2];
char xsend[XBLEN];
//char id[16][3]={"A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF"};
char id[16][3]={"B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF"};
char end_id[]="^";
char *dummy;

