This function clears the screen.But this is supported only in older versions of Arduino( like 0022 ).
I'm using Arduino version 1.But it's not supported!Do you now how to fix it???
Sorry PaulS please don't joke with me !
I said that i'm newbie and i would appreciate if you could help me.
Sorry for my mistakes.I know that when someone then the possibility to make errors is grower.So???
What should i say about that?
My Arduino Com previews a menu with choices.But i don't know how can make the loop to clear the old display messages.
sirus:
Hello everybody!I would like to ask you something...
Look at this function:
void clearAndHome()
{
Serial.print(27, BYTE); // ESC
Serial.print("[2J"); // clear screen
Serial.print(27, BYTE); // ESC
Serial.print("[H"); // cursor to home
}
This function clears the screen.But this is supported only in older versions of Arduino( like 0022 ).
I'm using Arduino version 1.But it's not supported!Do you now how to fix it???
Have you ever tried this thing??
thanks a lot!
So, you are printing serial data back to the connected computer, possibly using a terminal emulator to read the data coming back from the Arduino...? Or, are you using the built-in serial monitor?
This probably doesn't belong in "Programming Questions", but, as suggested elsethread this really depends on the terminal settings.
Unless your question is about the Arduino serial monitor, in which case the fact that some version cleared the screen for this particular escape char sequence might have been more luck than purpose.
Hi everyone!
I use
void clearAndHome()
{
Serial.print(27, BYTE); // ESC
Serial.print("[2J"); // clear screen
Serial.print(27, BYTE); // ESC
Serial.print("[H"); // cursor to home
}
or
void clearAndHome()
{
Serial.write(27);
Serial.print("[2J"); // clear screen
Serial.write(27);
Serial.print("[H"); // cursor to home
}
but my Serial Monitor does not clear. It shows '[2Je[H' symbols.
Instead of Serial Monitor, use a terminal program that supports VT100. Tested with RealTerm (under Windows) and it clears the screen; I'm sure there are plenty others.