пеас

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Sergeev
Date:
Tue Dec 09 17:40:59 2014 +0000
Commit message:
??????

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 beb25340afe3 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 09 17:40:59 2014 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);  // USBTX - Tranmit on USB  USBRX - receive on USB
+
+int main()
+{
+    char read[10];
+   
+    while(1)
+    {  
+        wait(1);
+        printf("Heartbeat \r");
+              
+        if ( pc.readable() )
+        {     
+            printf("  There's something to read\r");
+            pc.scanf("%s", &read);
+            printf("  Reading %s \r", read);
+        }        
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r beb25340afe3 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Dec 09 17:40:59 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file