Arduino Serial Printing functions

Hey everyone,

I am trying to create a function in Arduino that moves the cursor in a terminal client. I have a function definition of:

void MoveCursor(uint8_t x, uint8_t y).

Can someone show me how to do something like this using Serial.Print() functions?

Regards

Michael

One needs more details than what you provided to help you. What’s a terminal client? A PC? Are you trying to send a key press to it using Arduino?

Ok, for terminal clients, there are escape sequences that can manipulate the terminal in different ways(clear the terminal, clear the line, change the colour of the screen/font)

See: http://en.wikipedia.org/wiki/ANSI_escape_code

So for example, this is how I would clear the current line in a terminal using arduino:

Serial.print(27,BYTE);

Serial.print(“[K”);

I want to be able do the ‘Cursor Position’ command from that escape code list. Can someone please help me

Michael

That wiki page is hard for me. don’t now why, maybe no experience with old terminals at all explains.

Will this work?

Serial.print(27,BYTE);

Serial.print(“A”);

Or maybe:

Serial.print(27,BYTE);

Serial.print(1,BYTE);

Serial.print(“A”);

Don’t worry, I found it here:

http://www.arduino.cc/cgi-bin/yabb2/YaB … 1266006508

Thanks for your help!