 // RTC Memory Address for the DoubleResetDetector to use
 #define DRD_ADDRESS 0
 
-DoubleResetDetector drd(DRD_TIMEOUT, DRD_ADDRESS);
+DoubleResetDetector* drd;
 
 //callback notifying us of the need to save config
 void saveConfigCallback () {

  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();
  
  goToSleep();
} // end of void setup()

#include <farmerkeith_BMP280.h> // library, download from https://github.com/farmerkeith/BMP280-library
#include <ArduinoJson.h>          //https://github.com/bblanchon/ArduinoJson
#include <BlynkSimpleEsp8266.h>

//#include <DoubleResetDetector.h>   //<<-- got bug, auto wipe of wifi manager settings happened
#define ESP_DRD_USE_LITTLEFS    true    //false
#define DOUBLERESETDETECTOR_DEBUG       true  //false
#include <ESP_DoubleResetDetector.h>

// configuration constants
const bool bme280Debug = 0; // controls serial printing
