hhh

Dependencies:   mbed

Revision:
0:7b7e8b116cad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jul 04 19:00:58 2014 +0000
@@ -0,0 +1,29 @@
+//This program shows that when serial connection is enabled; 
+//the bits written stay on the serial bus on the pc-end , 
+//while reading them from serial bus those bits get redsed first
+
+
+#include "mbed.h"
+Serial pc(USBTX, USBRX);           // tx, rx
+
+main()
+{
+    while(1)
+    {
+        if(pc.readable()>0)
+        {
+            char input = pc.getc();
+            for(int i=0;i<100;i++)
+            pc.putc(input);
+        }
+        
+        for (int i=0; i<10;i++)
+        printf("%d",i);
+        
+        wait(2);
+    }
+}
+
+
+
+