jajajaja

Dependencies:   SoftSerial mbed

Revision:
0:1bdfe2ebaecd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jun 03 17:50:51 2017 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+#include "SoftSerial.h"
+#include <string>
+SoftSerial micro(D2,D3);
+Serial pc (USBTX, USBRX);
+DigitalOut bad(LED2);
+
+
+int main () {
+micro.baud(9600);
+pc.baud(9600);
+
+string readString;
+char message [125];
+ 
+ while (1)
+ {
+        while (micro.readable()>0) 
+                {
+                    wait(0.003);  
+                    //micro.gets(message,5);
+                    micro.scanf("%s", message);
+                    pc.printf("%s\r\n",message);
+                  //  readString += message; 
+        //if (readString.length()>0) 
+          //{
+            //    pc.printf("%s\r\n",readString);
+        //}
+            
+             readString="";
+                    break;
+                }
+        
+ }
+ 
+ }
\ No newline at end of file