Comunicación serial de pc a pc con tierra común con tarjeta núcleo F334R8

Dependencies:   SoftSerial mbed

Files at this revision

API Documentation at this revision

Comitter:
mauricio1989
Date:
Sat Sep 23 21:03:42 2017 +0000
Commit message:
Comunicaci?n seria de pc a pc con tierra comun , tarjeta Nucleo F334R8; Grupo de Digitales avanzados; Ricardo Rozo; Mauricio Cadena; Andres Usma

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 c760f6105125 SoftSerial.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SoftSerial.lib	Sat Sep 23 21:03:42 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/Sissors/code/SoftSerial/#236fce2e5b8c
diff -r 000000000000 -r c760f6105125 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Sep 23 21:03:42 2017 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+#include "SoftSerial.h"
+#include <string>
+// comunicacion serial de pc a pc con tierra comun, tarjeta nucle F334R8, Nombres del grupo Ricardo Rozo, Mauricio Cadena, Andres Usma
+DigitalOut Led(LED2);
+
+Serial pc(USBTX,USBRX);
+SoftSerial ST(D6,D7);
+char recibir;
+
+
+int main (){
+    
+    pc.baud(9600);
+    ST.baud(9600);
+    wait(0.1);
+    
+    while (1)
+    {
+        while (pc.readable()>0)
+        {
+            ST.putc(pc.getc());
+         
+        }
+        
+        while (ST.readable()>0) 
+        {
+            pc.putc(ST.getc());
+        }
+        wait(0.01);
+        if (ST.readable()>0)
+            {
+                recibir=ST.getc();
+              //LED=!LED;
+                pc.printf("%c",recibir);
+            wait(0.5);                
+                }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r c760f6105125 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Sep 23 21:03:42 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/675da3299148
\ No newline at end of file