 
 void loop() // run over and over
 {
-  if (XBee.available()) {
+  if(XBee.available()) {
     Serial.write(XBee.read());
     
     digitalWrite(ledPin, HIGH);

int RECV_PIN = 8;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()  
{

    XBee.write("roger");
  }
  
  if(Serial.available()) {
    Serial.write(Serial.read());
    XBee.println("msg from serial");
  }
  
  if(irrecv.decode(&results)) {
    
    //todo: filter redundant FFFFFFFF

    Serial.println(results.value, HEX);
    // Serial.println(results.decode_type);
    
    XBee.print("IR: ");
    XBee.println(results.value, HEX);

    switch(results.value) {
      case signalInit:
        Serial.println("singalStart");
        XBee.println("singalStart");
        break;
      
      case signalVerify:
        Serial.println("singalVerify");
        XBee.println("singalVerify");
        break;

      case signalConfirm:
        Serial.println("singalConfirm");
        XBee.println("singalConfirm");
        break;

    }

    irrecv.resume(); // Receive the next value

  }
  
  if(deviceStatus == statusPending) {
    //todo: start blinking
    ;
  }
    
}
