diff --git a/ESP8266_Code/ESP8266_Code.ino b/ESP8266_Code/ESP8266_Code.ino index ffccd876..8eae2e03 100644 --- a/ESP8266_Code/ESP8266_Code.ino +++ b/ESP8266_Code/ESP8266_Code.ino @@ -55,6 +55,9 @@ // If you don't know what MQTT means check this link: // https://www.techtarget.com/iotagenda/definition/MQTT-MQ-Telemetry-Transport +// Uncomment the line below if you wish to use Telnet connection +#define USE_TELNET + #ifdef USE_DHT float temp = 0.0; float hum = 0.0; @@ -132,9 +135,18 @@ void mqttReconnect() } #endif +#ifdef USE_TELNET +uint8_t i; +bool ConnectionEstablished; // Flag for successfully handled connection +#define MAX_TELNET_CLIENTS 2 +WiFiServer TelnetServer(23); +WiFiClient TelnetClient[MAX_TELNET_CLIENTS]; +#endif + namespace { // Change the part in brackets to your Duino-Coin username +// Change the part in brackets to your Duino-Coin username const char *DUCO_USER = "USERNAME"; // Change the part in brackets to your mining key (if you have enabled it in the wallet) const char *MINER_KEY = "MINING_KEY"; @@ -207,7 +219,7 @@ const char WEBSITE[] PROGMEM = R"=====(