Post topics, source code that relate to the Arduino Platform

User avatar
By Anand Lobo
#29904
trendchaster wrote:Hello Anand Lobo,
Can you provide the sketch.It will be highly appreciated.


Hi trendchaster, I used the basic sketch from the ESP8266 examples. Only changes were to connect to my specific network.
See: Examples -> ESP8266mDNS -> DNS_SD_Arduino_OTA. I uploaded the sketch once using my USB/Serial device, then made changes to the Serial output, and then recompiled and ran the OTA uploader. I knew it worked because the Serial output changed to the new one.
Rather than using the Arduino IDE to program the ESP8266, I only use the IDE to compile. I copied the esptool and espota.py uploader utilities into a separate folder and use the commandline to run them.
User avatar
By Rudolf
#35794
zeroK wrote:When you create a telnetServer you can use the printDebug as shown below

Code: Select allconst uint16_t aport = 8266;
WiFiServer TelnetServer(aport);
WiFiClient Telnet;


void printDebug(const char* c){
//Prints to telnet if connected
  Serial.println(c);
 
  if (Telnet && Telnet.connected()){
    Telnet.println(c);
  }
}

Hello zeroK,
I am trying your example code. Unfortunately I got while compiling:
Code: Select allArduino: 1.6.6 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (1M SPIFFS)"
       if (Telnet && Telnet.connected()) {
           ^
exit status 1
'Telnet' was not declared in this scope

What library you are including, to make it work?

Regards, Rudolf