Hello!
I think that there should be a way in software to clear the Serial Monitor screen. The next version of the Arduino IDE should have that feature. I think that because sometimes, I don't need a million lines of text scrolling through the screen at once. For example, if I want a temperature reading, I don't need a million lines of text printing every 0.1 seconds, but a single line of text that changes. Who else agrees?
Window's Command Prompt has a cls command to clear the screen. That way, this program will print the time and date on the command prompt screen:
The Serial object doesn't have a clear method, so no.
Depending on the emulation you've chosen, you'd send the appropriate escape sequence as a string.
For example, if I want a temperature reading, I don't need a million lines of text printing every 0.1 seconds, but a single line of text that changes. Who else agrees?
Good suggestion. I agree this would be a nice feature.
dkl65: @WizenedEE: What do you mean by the code you posted? Do you think that there is a way to clear the Serial Monitor using the sketch?
Well the first set should be added to HardwareSerial.cpp (with the appropriate modification to HardwareSerial.h) and the second set should be changed in the arduino source code in SerialMonitor.java
I tested the SerialMonitor.java code and it works! With this sketch:
dkl65:
What does that have to do with clearing the Serial Monitor screen?
To clear the serial monitor, you have to modify the source code to let it be cleared. To do that, you must download the arduino source, apply the change I gave you, compile it, and then run it. Then you must upload a program to the arduino to send the right code to clear it.
The instructions in the link you gave me is confusing. So I downloaded the Cygwin Terminal setup.exe. I selected all the defaults. When it told me to select a link to download the software from, I had no idea what that was, so I just chose a random link. The Cygwin thing had sucessfully installed. What next?
I currently using Arduino 1.0.1.
So much for clearing the screen!