0
Offline
Newbie
Karma: 0
Posts: 28
Arduino rocks
|
 |
« on: November 23, 2009, 06:51:17 pm » |
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
Brattain Member
Karma: 336
Posts: 36476
Seattle, WA USA
|
 |
« Reply #1 on: November 23, 2009, 06:57:02 pm » |
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
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #2 on: November 23, 2009, 10:58:47 pm » |
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/terminalLefty
|
|
|
|
« Last Edit: November 23, 2009, 10:59:30 pm by retrolefty »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 28
Arduino rocks
|
 |
« Reply #3 on: November 24, 2009, 08:54:54 am » |
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
Faraday Member
Karma: 35
Posts: 3651
@ssh0le
|
 |
« Reply #4 on: November 24, 2009, 11:18:50 am » |
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
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 1
Arduino rocks
|
 |
« Reply #5 on: December 11, 2010, 08:43:13 pm » |
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
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #6 on: December 11, 2010, 09:07:36 pm » |
Hope this helps. It would have a year ago or so. ;D
|
|
|
|
|
Logged
|
|
|
|
|
|