#include "XbeeTools.h"

//Robot A code (Robot A is the first robot to transmit)

task main()
{
  InitRS485(); //Initialize the Xbee Radio

  string messageToSend = "Hello"; //Create String to Send
  SendString(messageToSend); //Send message

  string messageReceived; //Create a string to fill with message
  ReceiveString(messageReceived); //Wait to receive message

  nxtDisplayString(1, "B Said:%s", messageReceived); //Display the message to line 1 of the LCD screen
  wait1Msec(5000); //Dislay for 5 seconds
}
