 // This #include statement was automatically added by the Particle IDE.
 #include <MQTT.h>
 
+//
+
 // xbee object
 XBee xbee = XBee();
 
-// payload array for xbee transmission 
+// payload array for xbee transmission
 byte payload[6] ;
 
 // TX objects:



void setup() {
    
    Serial.begin(9600);
    Serial1.begin(9600);
    xbee.setSerial(Serial1);
    
    Serial.println ("Todo ok hasta aqui");

}

void loop() {
    
    
   xbee.readPacket();
    
    if (xbee.getResponse().isAvailable()) {
      // got something
      if (xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {

      } else if (xbee.getResponse().getApiId() == MODEM_STATUS_RESPONSE) {
        xbee.getResponse().getModemStatusResponse(msr);
        // the local XBee sends this response on certain events, like association/dissociation

        if (msr.getStatus() == ASSOCIATED) {
          // yay this is great.  flash led
          Serial.print ("local Xbee got associated");
