Basic xbee example

Example demonstrates basic "no wires" functionality of the xbee radios. Useful to test network latency and node range.

/** 
 * demonstrates xbee module working on transparent mode
 * setup: Node sends id and counter data to base station via xbee radio
 *
 * example taken and developed from double counter by David Cuartielles
 * http://www.arduino.cc/playground/Shields/Xbee013
 *
 * we hardcode NODE_ID reflecting the ATMY value from the zigbee radio
 *
 * Base station configuration: ATRE, ID(your PAN id), MY0, BD4, WR, CN
 * Node configuration: ATRE, ID(your PAN id), MY1, DL0, DH0, BD4, WR, CN
 *
 * (cleft) 2008 Gonzalo Garcia-Perate
 * http://www.makingsenseofspace.com/arduino-wireless-workshop/
 *
 */

#define NODE_ID   1
int count = 0;

void setup() {
  Serial.begin( 19200 );
}

void loop() {
 
  Serial.print( "node: " );
  Serial.print( NODE_ID );
  Serial.print( " count: " );
  Serial.print( count );
  Serial.println(); 
  delay( 1000 );

  count++;
  
  if (count == 1024){
   Serial.print( NODE_ID );
   Serial.print( " resetting counter" );
   Serial.println(); 
   count = 0;
    
  }
}