   bme0.updateF4Control16xSleep(); // use instead of saveCounter if counter is not required
 
   // You can also call drd.stop() when you wish to no longer
-  drd.stop();
+  drd->loop();
   
   goToSleep();
 } // end of void setup()

  //Local intialization. Once its business is done, there is no need to keep it around
  WiFiManager wifiManager;

  if (drd.detectDoubleReset()) {
    Serial.println("Double Reset Detected");
    //shall do clean up of API key after wifi reset
      wifiManager.resetSettings();
      ESP.reset();
      delay(1000);
  } else {
    Serial.println("No Double Reset Detected");
  }


// RTC Memory Address for the DoubleResetDetector to use
#define DRD_ADDRESS 0

DoubleResetDetector* drd;

//callback notifying us of the need to save config
void saveConfigCallback () {
