A story of three xbees; two emitters and one hub

danieljay:
And can you give me a example in code ? Having hard time understanding that with syntax

An example of what exactly?

Transmitter code might look like

    const byte nodeID = 1;
    int myData;

    Serial.write('*');            //message start delimiter
    Serial.write(nodeID);
    Serial.write(myData >> 8);    //most significant byte
    Serial.write(myData & 0xFF);  //least significant byte

Receiver code might look like

    byte c;
    byte nodeID;
    int myData;

    c = Serial.read();
    if (c == '*') {                     //wait for start delimiter
        nodeID = Serial.read();
        myData = Serial.read() << 8;    //msb
        myData += Serial.read();        //lsb
        
        //message received and decoded, continue processing it...
    }

Checking for a premature start delimiter is left as an exercise for the reader :smiley: