I'd like to set up a little web server where I show the content of what's printed to Serial, for diagnostic reasons (so that you don't have to connect via USB all the time).
I've found the WebSerial and WebSerialLite libraries but it currently looks like I'd have to do the prints twice.. once for the Serial and once for the WebSerial.
Is there any way I could just route the Serial output directly to the WebSerial?
Using IDE 2.3.2 and Arduino Nano ESP32 2.0.13 (ESP32-S3 Rev 0)
The compiler will use the appropriate version of the function based on data type. This is known as function overloading
Put all of your versions of your print function in a .h file and #include it in your sketch or better still create a library and call it from any sketch where it is #included