Hi,
Serial monitor has a 'Clear output' button.
And why is there no such command from Arduino?
For example: Serial.Clear();
(command: 'FF' code: 0C = 'form feed')
This will allow you to observe a static inscription
in several lines, as on the display without shifting them.
Now you can output only one line by disabling NL&CR,
but what if you need 10 lines?
Serial.print() (that is, the default UART serial output) is often used to communicate with other devices, and a Serial.clear() command would make no sense for most of those.
OP wants to be able to clear the serial monitor via a Serial.clear() command on the Arduino. They are very clear on that in their original post and if you do not understand that, it is your problem.
You don't have to enable it again to see more; you can simply scroll with e.g. the scroll-bar. There is a buffer that limits how much the Serial Monitor can display, it will start scrolling again once the buffer is full.
Note that there was a time that there wasn't even an option to disable scrolling.
It would be nice if Serial Monitor was a full fletched terminal program but it isn't. The only advantage of Serial Monitor is that it can be controlled by the IDE so the COM port that it uses can be closed by the IDE before an upload.
Your topic has been moved to a more suitable location on the forum.
Required is a terminal program that reacts on commands sent by Serial. If that program recognizes a CLEAR character then every Arduino can send that character.
The following codes will clear the Serial buffer for you. Incorporating the clear() method would risk the deleting the whole message (which could not be recovered) by accident?