Dependents:   JOGO_CORRIDA Snake mbedbreakingout

A super simple way to implement crude terminal user interfaces over Stream/Serial using VT100 escape codes.

Simple example:

Serial pc(USBTX, USBRX); 
int main() {
    TermControl ctrl;
    ctrl.SetTerminal(&pc);
    ctrl.Reset();
    ctrl.Clear();
    ctrl.PrintAt(5,10,"FooBar!");
    int i=0;
    i=0;
    while(1) {
        i++;
        ctrl.SetCursor(5,11);
        pc.printf("%i",i);
        
    }
}

This simple program will continuously count, but instead of scrolling and such, it will print the counted numbers in one place. In this case, row 11, column 5.

I don't break out every escape code for the VT100, but I plan on adding more. Maybe even try to get some sort of support for the notion of "widgets" and such. Lightweight is my overall goal though.

Download repository: zip gz

Files at revision 2:ef410bacf0e5

Name Size Actions
[up]
TermControl.h 3239 Revisions Annotate