Transmitting and Receiving Messages to multiple XBee at a time

189 views
Skip to first unread message
Message has been deleted

Priyanshu Ajmera

unread,
Aug 20, 2018, 2:36:28 PM8/20/18
to xbee-api
Hello,

I've connected 6 XBee to each other in API Mode 2 mounted on a top of LEGO EV3 Robot. Now I want to transmit messages in form of coordinates from one XBee to another. And also want to update the location every second.

Firstly, how to send a string of data along with coordinates. Like, if we are sending a message from Router 1 to other Router, by just sending the location of the Robot how do we get to know that from which router the data was sent.
  uint8_t xy[3];
  xy
[0] = "XBeeId 1:";
  xy
[1] = rand()%10;
  xy[2] = rand()%10;
  //Serial.print(xy[0]);
  //Serial.print(",");
  //Serial.print(xy[1]);
  //Serial.println(xy[2]);
  ZBTxRequest zbTx5 = ZBTxRequest(ROUTER5, xy, sizeof(xy));
  xbee.send(zbTx5);

This gives an error:    no matching function for call to 'HardwareSerial::print(uint8_t&, uint8_t&, uint8_t&)'

Secondly, while at the receiving end, how to get the entire string which will contain a string as well as the location of the Robot.

Thanks,
Priyanshu Ajmera.
Reply all
Reply to author
Forward
0 new messages