Add function online re-programming.
Quick led perform
command:
1 OnBoard Auto Control Off
2 OnBoard Auto Control On
3 Online ReProgram the level for led
5 set Led 5 On
6 set Led 6 On
7 set Led 7 On
=====================================================
arduino code：
/**
	author guogengchen
 */
#include <XBee.h>
#define disSH 0x00000000
#define disSL 0x00000000
XBee xbee = XBee();
uint8_t payload[] = {0,0};
XBeeAddress64 addr64 = XBeeAddress64(disSH,disSL);
ZBTxRequest zbTx = ZBTxRequest(addr64, payload, sizeof(payload));
ZBTxStatusResponse txStatus = ZBTxStatusResponse();
XBeeResponse response = XBeeResponse();
ZBRxResponse rx = ZBRxResponse();
int pin5 = 0;
int statusLed = 13;
int level1 = 200;
int level2 = 300;
boolean autocontrol = true;
void flashLed(int pin, int times, int wait) {

  for (int i = 0; i < times; i++) {
    digitalWrite(pin, HIGH);
    delay(wait);
    digitalWrite(pin, LOW);

    if (i + 1 < times) {
      delay(wait);
    }
  }
}
void setLedOn(int data)
{
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);
  digitalWrite(data, HIGH);
}

void setup() {
  pinMode(statusLed, OUTPUT);
  Serial1.begin(9600);
  xbee.setSerial(Serial1);
}

void loop() {   
	xbee.readPacket();
    if (xbee.getResponse().isAvailable()) {   
      if (xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {
	   xbee.getResponse().getZBRxResponse(rx);
	   flashLed(statusLed,rx.getData(0),100);
            if(rx.getData(0) == 1){autocontrol=false;}
            if(rx.getData(0) == 2){autocontrol=true;}
            if(rx.getData(0) ==
3){level1=rx.getData(1);level2=rx.getData(2);}
 	   if(rx.getData(0) == 5){setLedOn(5);}
	   if(rx.getData(0) == 6){setLedOn(6);}
	   if(rx.getData(0) == 7){setLedOn(7);}
	   }
	   }
  pin5 = analogRead(5);
          if(autocontrol==true){
 	   if(pin5<level1){setLedOn(5);}
	   if(pin5>=level1 && pin5< level2){setLedOn(6);}
	   if(pin5>=level2){setLedOn(7);}
          }
    payload[0] = pin5 >> 8 & 0xff;
  payload[1] = pin5 & 0xff;
  xbee.send(zbTx);
  delay(1000);
}