     Serial.print(", ");
    }
   } 
-//  else {
-//   Serial.println("Failed to read from DHT");
-//  }
-  
   
   sensors_event_t event;
-  bmp.getEvent(&event);
- 
+  bmp.getEvent(&event); 
   Serial.print("'AtmoPressure':");
   if (event.pressure)
   {

void setup() {
  pinMode( LEDPIN , OUTPUT);
  pinMode( XBEESLEEPPIN , OUTPUT);
  
  Serial.begin(57600); 
  dht.setup(DHTPIN);
  

    Serial.print("Ooops, no TSL2561 detected ... Check your wiring or I2C ADDR!");
    while(1);
  }
  
  configureLightSensor();
  
  //Delay for 30 sec at startup after a manual RST to allow for the wireless programmer to transition 
  // the board into the bootloader, or change other XBEE settings remotely, c.f. disable pin sleep mode to keep the XBEE up
  blink(30, 500);
}

void blink(int times){
  blink(times, 250);
}

void blink(int times, int delayValue){
   for(int i=0; i<times; i++){
      digitalWrite(LEDPIN, LOW);
      delay(delayValue); 
      digitalWrite(LEDPIN, HIGH);
      delay(delayValue); 
   }
}

void loop() {
  digitalWrite(XBEESLEEPPIN, LOW);  //Wake UP XBEE
  delay(2000);

  blink(25, 50);
  digitalWrite(LEDPIN, LOW);  
  delay(1000);

  digitalWrite(LEDPIN, HIGH);  

  sample += 1;

  if (!pingCoordinator()){          //check if xbee woke up and got its association address. blink LED rapidly and quit loop otherwise
    blink(10);
    digitalWrite(LEDPIN, LOW);
    sleep(10000); 
    return;
  }

  Serial.print("{'_sensor': 'weather', '_sample': {'_id':"); 
  Serial.print(sample); 
  Serial.print(", "); 
  
  float h = dht.getHumidity();
