Arduino OTA - will print serial to terminal widget work?

Wemos D1 mini ESP8266
Local Blynk server running on raspberry pi

I have OTA working thanks to reading the previous posts

#include <ESP8266mDNS.h>  //for OTA updates
#include <WiFiUdp.h>     //for OTA updates
#include <ArduinoOTA.h>  //for OTA updates

void setup()
  ArduinoOTA.onError([](ota_error_t error) { ESP.restart(); });

void loop()
  ArduinoOTA.handle();  // For OTA

I realize the serial monitor does not work with OTA, but I was wondering if serial to terminal widget would work?

If so, does it still require the tx and rx pins to be connected together like in this post? Redirect serial to terminal

Or is there a code only alternative?
i.e. Blynk.virtualWrite(V1, )


The example you linked to works well if you put a jumper across Rx and Tx.
It will continue to output to the PC’s serial monitor as well as printing to the terminal widget, but you’llneed to remove the jumper if you want to do a wired upload of code (but not for OTA uploads).

For me, I don’t see any inconvenience in having the jumper in place.

If you wanted to, you could use a flag to say whether or not you want the output to the terminal widget to be switched on, and maybe add a “terminal clear” button.


Thanks Pete, helpful and informative as usual :smile:

1 Like