       start_time = millis();
       state = PENDING;
     }
+
     break;
   case PENDING:
     end_time = millis();
+
+    if(end_time - toggle_time > 500) {
+      digitalToggle(ledStatusPin);
+      toggle_time = millis();
+    }
+
     // soft timer expires
     if (end_time - start_time > DELAY_IN_WAIT/1000) {
       Serial.println("[PENDING] Timer expires, back to IDLE");

}

int readXBeeString (char *strArray) {
  int i = 0;
  if(!XBee.available()) {
    return -1;
  }
  while (XBee.available()) {
    strArray[i] = XBee.read();
    i++;
  }
  strArray[i] = '\0';
  return i;
  
  Serial.print("read XBee: ");
  Serial.println(strArray);
  // sendMsg(XBeeInString);
}

      	Serial.println("[CONNECTED] entering state");

      	// turn on the ligth to indicate
      	digitalWrite(ledStatusPin, HIGH);

      	state = CONNECTED;
      }
