Clearing the data in Serial monitor

Hello, I am new to Arduino.

I am stuck with clearing the serial monitor using serial commands of Arduino. Is it possible to clear the Serial monitors' data every time the void loop runs?

No.

Do you mean emptying the Serial buffer on the Arduino? Or do you really mean clearing the screen of the Serial Monitor (part of the IDE)?

If you want to empty the buffer, just read until no more characters are available...

while( Serial.available() > 0 ) Serial.read();

The closest thing to can do to clearing the Serial Monitor screen via an Arduino sketch is to print so many blank lines that you know any text will have scrolled off the screen. Of course that depends on auto scroll being turned on in the Serial monitor.

if you use a different serial terminal application that supports VT100 control escape sequences you can do it:

Of course that depends on auto scroll being turned on in the Serial monitor.

SerialMonitor.png

SerialMonitor.png

I'm guessing that pic looks just like the OP's screen. (maybe not pink)