 /**
  * This is a kind of unit test for DEV for now
+ * It contains many of the public methods
+ * 
  */
 #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
 #include <time.h>

void loop() {
  // is configuration portal requested?
  if ( digitalRead(TRIGGER_PIN) == LOW ) {
    Serial.println("BUTTON PRESSED");
    wm.setConfigPortalTimeout(140);
    wm.setWiFiAPChannel(13);

    // disable captive portal redirection
    // wm.setCaptivePortalEnable(false);
    
    if (!wm.startConfigPortal("OnDemandAP","12345678")) {
      Serial.println("failed to connect and hit timeout");
      delay(3000);
    } else {
      //if you get here you have connected to the WiFi
      Serial.println("connected...yeey :)");
      print_oled("Connected\nIP: " + WiFi.localIP().toString() + "\nSSID: " + WiFi.SSID(),1);    

  // wm.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));
  // wm.setAPStaticIPConfig(IPAddress(10,0,1,99), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); 

  // set country
  wm.setCountry("US"); // setting wifi country seems to improve OSX soft ap connectivity, may help others as well
  
  // set channel
  wm.setWiFiAPChannel(13);
  
  // set configrportal timeout
  wm.setConfigPortalTimeout(120);
  // wm.startConfigPortal("AutoConnectAP", "password");

