Hello @Caterpillaraoz
you could try something like this every time you want to log something:
Serial.begin(115200);
Serial.println("Hello World");
Serial.end(true);
ModbusRTUClient.begin(115200, SERIAL_8N1);
Please note that all debug output you send this way will also be sent to the Modus RTU server. This could potentially lead to unwanted results, should the parser in the Modbus RTU server choke on it.
In addition you'll see everything the Modbus RTU server is sending back in the log as well.
As an alternative you could use a second serial connection for debug output through one of the Groove ports using a separate USB Serial converter. E.g. like this:
Serial1.begin(115200, SERIAL_8N1, 16, 17);
Serial1.println("Hello world");
Thanks
Felix