Send payload using xbee and arduino

Hello

I know this is a old issue..but i can't receive a payload sent for a xbee series 1 attached a arduino, i need the code to receive that in other xbee-arduino system.
here how i created the tx payload ( for that i have the code working fine), my problem is code to receive and translate the payloads in numbers again
where "stuff" k or y, are temperatures from sensors,

uint8_t payload[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Tx16Request tx = Tx16Request(0xFFFF, payload, sizeof(payload));
union {
int32_t f;
byte b[4];
} stuff;
union {
int32_t j;
byte b[4];
} stuff1;

stuff.f = k ;
stuff1.j = y ;

payload[0] = 1;
payload[1] = stuff.b[0];
payload[2] = stuff.b[1];
payload[3] = stuff.b[2];
payload[4] = stuff.b[3];
payload[5] = stuff1.b[0];
payload[6] = stuff1.b[1];
payload[7] = stuff1.b[2];
payload[8] = stuff1.b[3];
payload[11] = 0 ;//just the number 0
payload[12] = 3 ;//just the number 1
sendPayload();

thanks

Why do you have two unions with exactly the same content? You MIGHT, though I doubt it, need two instances of ONE union.

  payload[11] = 0  ;//just the number 0
  payload[12] =  3 ;//just the number 1

Two comments. One right; one wrong. 500 is a great batting average. For coders, that %age of correctness is abysmal.

my problem is code to receive and translate the payloads in numbers again

Why is that a problem? You can obviously extract the two byte values easily. Create the same union, and two instances of it. Populated the byte side of the union, and use the float side.

One really has two question why you are using API mode at all, though. AT is far easier to use.