You are viewing an older revision! See the latest version
VT100 Terminal
A simple library for controlling the cursor position and colour on a serial terminal emulator.

Hello World!¶
main.cpp
// simple test for a ANSI/VT100 Terminal, sford
#include "mbed.h"
#include "Terminal.h"
Terminal term(USBTX, USBRX); // tx, rx
int main() {
term.printf("Hello World!\nHow are you?");
wait(2);
term.locate(3,1);
term.foreground(0xFF0000);
term.printf("I'm Great!");
wait(3);
term.cls();
}
Library¶
Details¶
A terminal program like Teraterm or Hyperterminal often supports escape sequences to control things like cursor location and colour. A common set of escape codes are those first used on the VT100 terminal, which are listed sequences, as found here:
Reference¶
- Based on these experiments