Echo keybord input to TerraTerm. ST Nucleo L152RE
Dependencies: mbed
Fork of L152_blink_led by
Revision 1:17cbc036ba01, committed 2015-01-26
- Comitter:
- microXtra
- Date:
- Mon Jan 26 15:13:41 2015 +0000
- Parent:
- 0:fd9826e1d40c
- Commit message:
- Test USB Serial
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r fd9826e1d40c -r 17cbc036ba01 main.cpp --- a/main.cpp Thu Dec 18 11:28:10 2014 +0000 +++ b/main.cpp Mon Jan 26 15:13:41 2015 +0000 @@ -1,16 +1,10 @@ #include "mbed.h" -DigitalOut myled(LED1); - +Serial pc(USBTX, USBRX); + int main() { + pc.printf("Echoes back to the screen anything you type\n"); while(1) { - myled = 1; // LED is ON - wait(1.0); // 1 sec - myled = 0; // LED is OFF - wait(1.0); // 1 sec - myled = 1; // LED is ON - wait(0.5); // 500 ms - myled = 0; // LED is OFF - wait(0.5); // 500 ms + pc.putc(pc.getc()); } -} +} \ No newline at end of file