STDin and STDout example

Dependencies:   mbed

Revision:
2:677b83cb846c
Parent:
1:2f9d56e97f30
diff -r 2f9d56e97f30 -r 677b83cb846c main.cpp
--- a/main.cpp	Mon Mar 18 11:42:27 2019 +0000
+++ b/main.cpp	Tue Mar 19 13:54:37 2019 +0000
@@ -3,12 +3,18 @@
 Serial pc(USBTX, USBRX);
 
 int main() {
+    
     char buffer[128];
-
     pc.printf("Starting..\n");
+//    int count = 0;
 
     while (1) {
         pc.gets(buffer, 4);
         pc.printf("I got '%s'\n", buffer);
+ 
+        // Alternate version to process data over serial from a host program...    
+//        pc.printf("The counter is '%d'\n", count);
+//        count++;
+//        wait (1);
     }
 }