// Destination MAC address
//////////////////////////////////////////
char RX_ADDRESS[] = \"0013A200403A2A49\";
//////////////////////////////////////////
// Define the Waspmote ID
char WASPMOTE_ID[] = \"node_01\";
USB.println(F(\"Sending packets example\"));
// store Waspmote identifier in EEPROM memory
frame.setID( WASPMOTE_ID );
//////////////////////////
// 2. check XBee\'s network parameters
//////////////////////////
///////////////////////////////////////////
///////////////////////////////////////////
frame.createFrame(ASCII);
frame.addSensor(SENSOR_STR, \"new_sensor_frame\");
frame.addSensor(SENSOR_BAT, PWR.getBatteryLevel());
///////////////////////////////////////////
///////////////////////////////////////////
error = xbeeZB.send( RX_ADDRESS, frame.buffer, frame.length );
USB.println(F(\"send ok\"));
USB.println(F(\"send error\"));
/*******************************************
* checkNetworkParams - Check operating
* network parameters in the XBee module
*******************************************/
void checkNetworkParams()
// 1. get operating 64-b PAN ID
xbeeZB.getOperating64PAN();
// 2. wait for association indication
xbeeZB.getAssociationIndication();
while( xbeeZB.associationIndication != 0 )
// get operating 64-b PAN ID
xbeeZB.getOperating64PAN();
USB.print(F(\"operating 64-b PAN ID: \"));
USB.printHex(xbeeZB.operating64PAN[0]);
USB.printHex(xbeeZB.operating64PAN[1]);
USB.printHex(xbeeZB.operating64PAN[2]);
USB.printHex(xbeeZB.operating64PAN[3]);
USB.printHex(xbeeZB.operating64PAN[4]);
USB.printHex(xbeeZB.operating64PAN[5]);
USB.printHex(xbeeZB.operating64PAN[6]);
USB.printHex(xbeeZB.operating64PAN[7]);
xbeeZB.getAssociationIndication();
USB.println(F(\"\nJoined a network!\"));
// 3. get network parameters
xbeeZB.getOperating16PAN();
xbeeZB.getOperating64PAN();
USB.print(F(\"operating 16-b PAN ID: \"));
USB.printHex(xbeeZB.operating16PAN[0]);
USB.printHex(xbeeZB.operating16PAN[1]);
USB.print(F(\"operating 64-b PAN ID: \"));
USB.printHex(xbeeZB.operating64PAN[0]);
USB.printHex(xbeeZB.operating64PAN[1]);
USB.printHex(xbeeZB.operating64PAN[2]);
USB.printHex(xbeeZB.operating64PAN[3]);
USB.printHex(xbeeZB.operating64PAN[4]);
USB.printHex(xbeeZB.operating64PAN[5]);
USB.printHex(xbeeZB.operating64PAN[6]);
USB.printHex(xbeeZB.operating64PAN[7]);
USB.print(F(\"channel: \"));
USB.printHex(xbeeZB.channel);