 //Keeps track of the number of messages to be sent to the server
 int qCount = 0;
 
+int loopCount = 0;
+
 //These arrays are what hold the different parts of the messages to be sent to the server
 String nodeIds[QMAX];
 int spacesAvail[QMAX];

		}
        delay(2000);
    }
}

/*
    Software Reset Functions
*/

/*
    Enables the watchdog timer and starts an infinite loop so the uC restarts
*/
void soft_reset() {
   wdt_enable(WDTO_15MS);
   while(1) {};
}

/*
    Disabled the watchdog timer as soon as possible on startup (before bootloader) so it doesn't continually restart chip.
*/
void wdt_init(void) __attribute__((naked)) __attribute__((section(".init3")));
void wdt_init(void)
{
   MCUSR = 0;
   wdt_disable();

   return;
}

// Timeout Functions
// ========================================
unsigned long _timeout_end = 0;

void timeout_init(int timeoutms) {
    _timeout_end = millis() + timeoutms;
}
unsigned long timeout_remaining() {
    return _timeout_end-millis();
}
bool timeout_timedout() {
    return millis() > _timeout_end;
}


{
  DEBUG_INIT(9600);
  xbee.begin(XBEE_BAUD); // Communicates with node
  //timeout_init(5000);//Starts timer for updates to be sent to server
  
  /*This starts the network connection*/
  while (!simcomm.isOn()) {
