Coordinator request

I have a coordinator (uno +zigbee2) and an end device (atmeg328 +zigbee2+sensors).Below you ll see my code for the end device that take some measures and send them to coordinator

End Device:

#include <DHT.h>
#include <XBee.h> #define DHTPIN 4     //DIGITAL HUMIDITY-TEMPERATURE PIN
#define DHTTYPE DHT22 //DHT11, DHT21, DHT22


int sensorPin=A0;   ///////////  WATERPROOF ANALOG SENSOR TEMPERATURE
int analSol=A2;     //////////   ANALOG SOIL HUMIDITY XBee xbee = XBee(); 
DHT dht(DHTPIN, DHTTYPE);


 
/////////////////////////////////////////////////////  SETUP /////////////////////////////////////////////////////
void setup() {pinMode(13, INPUT);    //////////   DIGITAL OUT OF SOIL HUMIDITY (DEBUG PURPOSES)
    pinMode(A0,INPUT);    ///////////  WATERPROOF ANALOG SENSOR TEMPERATURE
    pinMode(A2,INPUT);    //////////   ANALOG SOIL HUMIDITY
   Serial.begin(9600); 
   xbee.setSerial(Serial);    ////////ZIGBEE INIT
   dht.begin();         ///////DHT-22 DIGITAL SENSOR INIT

///////////////////////////////////////////////////////////////////////////////////////////
}
int seconds=0;
void loop() {

 
  seconds++;

  ////////// Reading temperature or humidity takes about 250 milliseconds!////////////////
  ////////// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)//////////////
  
  delay(2000); // wait for 2 seconds
  
  //////////////////////////////////////Digital Humidity-Temperature/////////////////////////////////////////////////////////
  //Read Humidity
   float h = dht.readHumidity();
  // Read temperature as Celsius
  float t = dht.readTemperature();

  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
   // return;
  }  
  Serial.print("Humidity: "); 
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: "); 
  Serial.print(t);
  Serial.println(" *C ");

  


  
///////////////////////////WaterProof Analog Temperature//////////////////////////////////////////

  delay(1000);

  int oo=analogRead(sensorPin);
  delay(10);
  oo=analogRead(sensorPin);
  delay(10);
  float temperatureC = ( 5.0 * oo * 100.0) / 1024.0 ;  //converting from 10 mv per degree wit 500 mV offset
                                               //to degrees ((voltage - 500mV) times 100)
 Serial.print("Voltage: ");
 Serial.println(oo * 5.0 / 1023.0);

 Serial.print(temperatureC);
 Serial.println(" Degrees C");


 
/////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////Soil Humidity/////////////////////////////////////

 delay(1000);
 
  int temp=analogRead(analSol);
  delay(10);
  temp=analogRead(analSol);
  delay(10);
  int sensS=digitalRead(soilPin);
  Serial.print("Soil Humidity DIG: ");
  Serial.println(sensS);
  Serial.print("Soil Humidity ANA: ");
  Serial.println(temp);
  Serial.println("------------------");


   /* constraint function will limit the values we get so we can work better with map
 * since I only need values in the bottom limit of 300, will make it the outer limit and 1023 the other limit
 */
 temp = constrain (temp, 300,1023);
 // print the values returned by the sensor
 //Serial.println(sensorValue);
 // create a map with the values
 // You can think we have the 100% to 300 and 0 % to 1023 wrong, but no !
 // 300 - or 100 % - is the target value for moisture value in the soil
 // 0% of humidity - or moisture - is when the soil is dry
 temp = map (temp, 300, 1023, 100, 0);
/////////////////////////////////////////////////////////////////////////////////////////


////////////////// Making A String and converting to BYTE ARRAY FOR SEND////////////////////////
 

String FinalString=String("HI"+String(h)+","+"TI"+String(t)+","+"TE"+String(temperatureC)+","+"S"+String(temp));
byte byteDataSend[FinalString.length()+1];
FinalString.getBytes(byteDataSend,FinalString.length()+1);

//Serial.println("FINAL STRING");
//Serial.print(FinalString);
  String myString = String((char *)byteDataSend);
  Serial.print("TOTAL STRING");
  Serial.println(myString);



////////////////////////////////////////// SENDING TO ZIGBEE///////////////////////////////////////////////////
delay(1000);

  //send data to coordinator
  //uint8_t data[] = bytesHI;

  XBeeAddress64 addr64 = XBeeAddress64();

  addr64.setMsb(0X0013A200);//XXXXX -> Msb address of router/end node

  addr64.setLsb(0X40E7CC41);//XXXXX -> Lsb address of router/end node 

  ZBTxRequest zbTx = ZBTxRequest(addr64, byteDataSend, sizeof(byteDataSend));

  xbee.send(zbTx);

}

Also at coordinator i wrote code to get data succesfully.Now i want to send a request to end device and then start sending sensors’ measurements.Which is the best practice?

Which is the best practice?

The one that works. What have you tried?