     } else {
       Serial.println("Unknown failure from DHT22");
     }
-    return; // try again later.
+    return false; // try again later.
   }
 
   // Cached results are now available in dht22.humidity and dht22.temperature
+  return true;
 }
 
 /*

  myBLE.addAttribute(bleTemperatureC);

  // Initialize our BLE Characteristics
  readTemperatureAndHumidity();
  setBLETemperatureAndHumidity(dht22.temperature, dht22.humidity);

  // Because of Curie startup, no serial output will be seen until the loop.

   updating the corresponding global variables and
   the time of the reading.

   Returns true if the sensor responded correctly; false if an error occurred.
*/
boolean readTemperatureAndHumidity() {
  int result;
  
  result = dht22.read22(DHT22_DATA);
  if (result != DHTLIB_OK) {
    if (result == DHTLIB_ERROR_TIMEOUT) {
      Serial.println("Timeout waiting for DHT22");
