   dnsServer.start(DNS_PORT, "*", apIP);// default FHTbot.com  //must use '.com, .org etc..' and cant use '@ or _ etc...' ! . Use "*" to divert all **VALID** names
   server.begin();
   server.setNoDelay(true);
+}
+
+void setupWebsocket(){
+  //start websocket
+  webSocket.begin();
+  webSocket.onEvent(webSocketEvent);
 }
 
 void initHardware()

 
#pragma GCC optimize ("-O2")           // O0 none, O1 Moderate optimization, 02, Full optimization, O3, as O2 plus attempts to vectorize loops, Os Optimize space
#include <ESP8266WiFi.h>
#include <FS.h>
#include <DNSServer.h>
#include <Ticker.h>

/*
Copyright 2017, Tilden Groves, Alexander Battarbee.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
