USB serial communication example

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ogata_lab
Date:
Wed May 29 13:34:54 2013 +0000
Commit message:
First Commit;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 1776fbcf5018 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed May 29 13:34:54 2013 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+#include "Serial.h"
+
+Serial usbSerial(USBTX, USBRX);
+
+int main() {
+    usbSerial.printf("Hello World!");
+    int i = 0;
+    while(1) {
+        usbSerial.printf("Counter = %d¥n", i);
+        i++;
+    }
+}
diff -r 000000000000 -r 1776fbcf5018 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed May 29 13:34:54 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file