jajajaja

Dependencies:   SoftSerial mbed

Files at this revision

API Documentation at this revision

Comitter:
sick010203
Date:
Sat Jun 03 17:50:51 2017 +0000
Commit message:
Esclavo;

Changed in this revision

SoftSerial.lib Show annotated file Show diff for this revision Revisions of this file
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 1bdfe2ebaecd SoftSerial.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SoftSerial.lib	Sat Jun 03 17:50:51 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/Sissors/code/SoftSerial/#a0029614de72
diff -r 000000000000 -r 1bdfe2ebaecd main.cpp
--- /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
diff -r 000000000000 -r 1bdfe2ebaecd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jun 03 17:50:51 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/4eea097334d6
\ No newline at end of file