Cool Fancy Terminal
Dependencies: SerialTerminal mbed
Fork of Fancy-Terminal by
main.cpp@4:317962df01f8, 2015-10-16 (annotated)
- Committer:
- madmonkeyman82
- Date:
- Fri Oct 16 16:05:46 2015 +0000
- Revision:
- 4:317962df01f8
- Parent:
- 3:35b0711f1832
New Serial teminal class
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" |
madmonkeyman82 | 4:317962df01f8 | 4 | #include "SerialTerminal.h" |
simon | 0:93888862261d | 5 | |
madmonkeyman82 | 4:317962df01f8 | 6 | SerialTerminal pc(USBTX, USBRX, 19600); // 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 | 4:317962df01f8 | 13 | pc.cls(); |
madmonkeyman82 | 4:317962df01f8 | 14 | pc.locate(20,10); |
madmonkeyman82 | 4:317962df01f8 | 15 | pc.printf("How are you?"); |
simon | 0:93888862261d | 16 | wait(2); |
madmonkeyman82 | 4:317962df01f8 | 17 | pc.locate(20,11); |
madmonkeyman82 | 4:317962df01f8 | 18 | pc.foreground(0xFF0000); |
madmonkeyman82 | 4:317962df01f8 | 19 | pc.background(0x000007F); |
madmonkeyman82 | 4:317962df01f8 | 20 | pc.printf("I'm Great!"); |
madmonkeyman82 | 4:317962df01f8 | 21 | pc.hideCursor(); |
madmonkeyman82 | 2:89b263d1a399 | 22 | wait(2); |
madmonkeyman82 | 2:89b263d1a399 | 23 | } |
simon | 0:93888862261d | 24 | } |