   }
   return NULL;
 }
+*/
 
 void configureLightSensor(void)
 {


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

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

  digitalWrite(LEDPIN, HIGH);  

  sample += 1;

  if (!pingDestination()){          //check if xbee woke up and got its association address. blink LED rapidly and quit loop otherwise
    blink(50, 100);
  } else {                          //connected to the destination
    
    Serial.print("{\"__device\": \"weather\", \"__sample\": {\"__id\":"); 
    Serial.print(sample); 

  
    Serial.println("}}");
    
    delay(500);   //Delay at the end to allow xbee to flush its send buffer 
  }

  digitalWrite(LEDPIN, LOW);
