     blink(10);
     digitalWrite(LEDPIN, LOW);
     digitalWrite(XBEESLEEPPIN, LOW);  //Wake UP XBEE
-
     sleep(60000); 
     return;
   }

  Serial.print(sample); 
  Serial.print(", "); 
  
  float h = dht.getHumidity();
  float t = dht.getTemperature();

  // check if returns are valid, if they are NaN (not a number) then something went wrong!
  if (!isnan(t) && !isnan(h)) {
   if (!isnan(t)){
    Serial.print("'Temp':"); 
    Serial.print(t);
    Serial.print(", ");
   }
   if (!isnan(h)){
    Serial.print("'RH':"); 
    Serial.print(h);
    Serial.print(", ");
   }
  } 
  
  sensors_event_t event;
  bmp.getEvent(&event); 
  Serial.print("'AtmoPressure':");
  if (event.pressure)
  {
     Serial.print(event.pressure); Serial.print(", ");
  }
  else
  {
    Serial.print("'NaN', ");
  }
  
  tsl.getEvent(&event); 
  Serial.print("'AmbientLight':"); 
  if (event.light)
  {
    Serial.print(event.light); Serial.print(", ");
  }
  else
  {
    Serial.print("'NaN' ");
  }
  Serial.println("}}");
  
  delay(2000);   //Delay at the end to allow xbee to flush its send buffer 

  sleep(60000);
}

void printValue(long value){
  if (!isnan(value))
  {
    Serial.print(value); Serial.print(", ");
  }
  else
  {
    Serial.print("'NaN', ");
  }
}

int pingCoordinator(void){
    
