   }
 
   // still no connection so try WifiManager
+  ledBlinker.attach(0.8, ledBlink); // slow blink led to show in Wifi AP mode
   WiFiManager wifiManager;
   wifiManager.setTimeout(240);
   if(!wifiManager.autoConnect(THIS_NAME.c_str())) {

#include <WiFiUdp.h>
#include <ArduinoOTA.h> 

const String THIS_NAME = String("ESP-") + ESP.getChipId();

int heartBeatInterval = 15000; // 15 seconds

void setup(void) {
    Serial.begin(115200); Serial.println();
    Serial.print(THIS_NAME); Serial.print(__DATE__);Serial.println(__TIME__);

    initWifi();
    Serial.print("WiFi connected to "); Serial.print(WiFi.SSID()); Serial.print(", IP address: "); Serial.println(WiFi.localIP());

    initOTA();
}


    if (millis() - lastHeartBeat > heartBeatInterval) {
      Serial.println("loop running");
      digitalWrite(LED_PIN, LOW);
      delay(50);
      digitalWrite(LED_PIN, HIGH);
      lastHeartBeat = millis();
    }
}
