Cool Fancy Terminal
Dependencies: SerialTerminal mbed
Fork of Fancy-Terminal by
main.cpp@3:35b0711f1832, 2015-10-15 (annotated)
- Committer:
- madmonkeyman82
- Date:
- Thu Oct 15 17:02:36 2015 +0000
- Revision:
- 3:35b0711f1832
- Parent:
- 2:89b263d1a399
- Child:
- 4:317962df01f8
hide show cursor;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:93888862261d | 1 | // simple test for a ANSI/VT100 Terminal, sford |
simon | 0:93888862261d | 2 | |
simon | 0:93888862261d | 3 | #include "mbed.h" |
simon | 0:93888862261d | 4 | #include "Terminal.h" |
simon | 0:93888862261d | 5 | |
simon | 0:93888862261d | 6 | Terminal term(USBTX, USBRX); // tx, rx |
simon | 0:93888862261d | 7 | |
simon | 0:93888862261d | 8 | int main() { |
madmonkeyman82 | 2:89b263d1a399 | 9 | |
madmonkeyman82 | 2:89b263d1a399 | 10 | |
madmonkeyman82 | 2:89b263d1a399 | 11 | while(1) |
madmonkeyman82 | 2:89b263d1a399 | 12 | { |
madmonkeyman82 | 2:89b263d1a399 | 13 | term.cls(); |
madmonkeyman82 | 2:89b263d1a399 | 14 | term.locate(20,10); |
madmonkeyman82 | 2:89b263d1a399 | 15 | term.printf("How are you?"); |
simon | 0:93888862261d | 16 | wait(2); |
madmonkeyman82 | 2:89b263d1a399 | 17 | term.locate(20,11); |
simon | 0:93888862261d | 18 | term.foreground(0xFF0000); |
madmonkeyman82 | 3:35b0711f1832 | 19 | term.background(0x000007F); |
simon | 0:93888862261d | 20 | term.printf("I'm Great!"); |
madmonkeyman82 | 3:35b0711f1832 | 21 | term.hideCursor(); |
madmonkeyman82 | 2:89b263d1a399 | 22 | wait(2); |
madmonkeyman82 | 2:89b263d1a399 | 23 | } |
simon | 0:93888862261d | 24 | } |