     String(address[0]) + "." + String(address[1]) + "." + 
     String(address[2]) + "." + String(address[3]);
 }
+void getMAC(char *buf) { // the MAC is 6 bytes, so needs careful conversion...
+  uint64_t mac = ESP.getEfuseMac(); // ...to string (high 2, low 4):
+  sprintf(buf, "%04X%08X", (uint16_t) (mac >> 32), (uint32_t) mac);
+}

const int TICK_POST_DEBUG = 200;
const int TICK_HEAP_DEBUG = 1000;

/////////////////////////////////////////////////////////////////////////////
// wifi management stuff ////////////////////////////////////////////////////
IPAddress apIP(192, 168, 99, 1);
IPAddress netMsk(255, 255, 255, 0);
ESP8266WebServer webServer(80);
String apSSIDStr = "WaterElf-" + String(ESP.getChipId());
const char* apSSID = apSSIDStr.c_str();
String svrAddr = ""; // address of a local server TODO delete?


    mcp.pinMode(mcpPins[i], OUTPUT);

  // try and set the host name
/*
  if(WiFi.hostname("waterelf"))
    dln(netDBG, "set hostname succeeded");
  else
    dln(netDBG, "set hostname failed");
*/
  delay(300); blink(3);         // signal we've finished config
}

