sketch_may02a.ino 363 Bytes
/* Input-side (button) Arduino code */
#include <SoftwareSerial.h>
// RX: Arduino pin 2, XBee pin DOUT.  TX:  Arduino pin 3, XBee pin DIN
SoftwareSerial xBee(2, 3);

void setup()
{
  // Baud rate MUST match XBee settings (as set in XCTU)
  xBee.begin(9600);
}

void loop()
{

    xBee.write('H');
    xBee.println("test");
    delay(500);
    xBee.write('L');
}