Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Robot Terminal Control Codes?

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
2 postsPage 1 of 1
2 postsPage 1 of 1

Robot Terminal Control Codes?

Post by Kess » Wed Feb 13, 2008 11:44 pm

Post by Kess
Wed Feb 13, 2008 11:44 pm

Does anyone know what kind of terminal the Robot Terminal emulates, if any? I'd like to be able to send escape codes from my CM-5 firmware to clear the screen and move the cursor around, just like the Bioloid motion editor firmware can do.

I've found that the VT52 "Esc H" sequence does make the cursor jump to home (top-left corner), but the VT52 "Esc J" sequence to clear the screen has no effect. ANSI/VT100 code sequences don't seem to work either.

Any clues?

Kess
Does anyone know what kind of terminal the Robot Terminal emulates, if any? I'd like to be able to send escape codes from my CM-5 firmware to clear the screen and move the cursor around, just like the Bioloid motion editor firmware can do.

I've found that the VT52 "Esc H" sequence does make the cursor jump to home (top-left corner), but the VT52 "Esc J" sequence to clear the screen has no effect. ANSI/VT100 code sequences don't seem to work either.

Any clues?

Kess
Kess
Robot Builder
Robot Builder
Posts: 18
Joined: Sun Nov 18, 2007 7:56 pm
Location: The Cotswolds, UK

Post by leb120 » Thu May 28, 2009 12:54 pm

Post by leb120
Thu May 28, 2009 12:54 pm

This one will move the cursor to any point on the 60 row by 80 column terminal window. 1;1 being the top left corner and 60;80 being the bottom right corner.

Code: Select all
Send the ASCII code for SOH, 2
Send the ASCII code for ESC, 27
Send the ASCII code for '[', 91
Send the ASCII code for '1', 49
Send the ASCII code for ';', 59
Send the ASCII code for '1', 49
Send the ASCII code for 'f', 102


Code: Select all
printf("%c%c[1;1f", 2, 27);
printf("%c%c[%d;%df", 2, 27, row, column);


The way the CM5 clears the screen is to send 60 line feeds in a row followed by either your home command or the command above.
Code: Select all
This one will move the cursor to any point on the 60 row by 80 column terminal window. 1;1 being the top left corner and 60;80 being the bottom right corner.

Code: Select all
Send the ASCII code for SOH, 2
Send the ASCII code for ESC, 27
Send the ASCII code for '[', 91
Send the ASCII code for '1', 49
Send the ASCII code for ';', 59
Send the ASCII code for '1', 49
Send the ASCII code for 'f', 102


Code: Select all
printf("%c%c[1;1f", 2, 27);
printf("%c%c[%d;%df", 2, 27, row, column);


The way the CM5 clears the screen is to send 60 line feeds in a row followed by either your home command or the command above.
Code: Select all
leb120
Newbie
Newbie
Posts: 1
Joined: Mon Dec 29, 2008 8:14 pm


2 postsPage 1 of 1
2 postsPage 1 of 1