Pages: [1]   Go Down
Author Topic: Clear Screen on Serial Monitor.  (Read 11588 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hiho All!

I'm a brazilian guy and my english isn't pretty good. So if anyone can help me i will thankful a lot!

My problem is:

How i can clear the screen on serial monitor?

like we does on #C: "system("cls");" or "clrscr;"

I've tryed "Serial.Clear", but i don't get any results, only a big red message, on my board.

Sorry about the english.

Thx.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do you want to clear the screen? It's a debugging window.

Closing it, and reopening it will clear it. It will also restart the Arduino.

You could also write your own serial window application. That's what I did. I have a Find field, to find data in the window. I can add additional features are they occur to me.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or better yet, instead of using the IDE serial monitor, use a real serial terminal program. If you are using Windows I highly recommend Brey terminal, it has tons of features, it's free, it's a standalone exe file, so no installation required. Along with tons of over commands, it has a clear receive window, clear send window.

http://sites.google.com/site/braypp/terminal

Lefty
« Last Edit: November 23, 2009, 10:59:30 pm by retrolefty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, thank everybody!

i want this code, because i'm reading the deegres of a servo and sending this data by serial, and debugging in serial monitor.

But when the debug gets a lot of lines, the serial comunication with arduino stop, and i need to restart the sketch!

I only want, try to clear the serial monitor screen to stop this error...

But i going to try brayapp like lefty said.

sorry about the english, one more time.   :-/

thx everyone again!
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if your using a normal terminal program i believe the clear charter is (ascii code)12 or 13
« Last Edit: November 24, 2009, 11:18:58 am by Osgeld » Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To clear the screen in a terminal emulator, a standard clear screen command is (esc)[2J, so your code would look like this:

  Serial.print(27,BYTE);   //Print "esc"
  Serial.print("[2J");

This will not work in the Arduino Serial Monitor, so you need a terminal emulator.  Since it doesn't use a serial port, you also need a serial port emulator.  DOSBox and Procomm will work.  Both are free.

Download and install DOSBox (I am using v 0.74), then modify the config file under [serial] and set serial1=directserial realport:COM1 (or whatever COM port you are using).

In Procomm, set the appropriate baud rate, using alt-p, and no parity, 8 data bits, and 1 stop bit.

Hope this helps.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hope this helps.

It would have a year ago or so.  ;D
Logged

Pages: [1]   Go Up
Jump to: