Nigson Burgos / Mbed 2 deprecated DEBER_COMUNICACION_SERIAL

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
nigsonb
Date:
Sat Feb 15 01:11:58 2020 +0000
Parent:
0:f979893b6860
Commit message:
Se realiza comunicacion serial entre las tarjetas STM32 Y F103RB

Changed in this revision

EMISOR_DATOS/main.cpp Show annotated file Show diff for this revision Revisions of this file
Recepto_Datos/main.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EMISOR_DATOS/main.cpp	Sat Feb 15 01:11:58 2020 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+#include "math.h" //libreria para las operaciones matematicas
+char texto[20];
+Serial PC (PA_2, PA_3);// comunicacion serial
+Serial xbee (PC_6, PC_7);// comunicacion serial
+//Serial PC (PB_10, PB_11); //comunicacion con el hercules serial
+float valor;
+int main (){
+    xbee.baud(9600); //velocidad de transmicion
+    PC.baud(9600);
+    while(true){   
+    xbee.scanf("%s[^\n]",texto);
+     PC.printf (" %s\n\r",texto);   
+     wait(0.1);
+           }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Recepto_Datos/main.cpp	Sat Feb 15 01:11:58 2020 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "math.h" //libreria para las operaciones matematicas
+char texto[20];
+//Serial xbee (PA_2, PA_3);// comunicacion serial
+Serial xbee (PC_10,PC_11);// comunicacion serial
+Serial PC (SERIAL_TX, SERIAL_RX); //comunicacion con el hercules serial
+float valor;
+int main (){
+    xbee.baud(9600); //velocidad de transmicion
+    PC.baud(9600);
+    while(true){   
+      PC.scanf("%s[^\n]",texto);
+      xbee.printf ("%s\n\r",texto);
+      PC.printf ("ENVIA DATOS: %s\n\r",texto);
+       wait(0.1);
+           }
+}
--- a/main.cpp	Fri Feb 14 16:15:57 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#include "mbed.h"
-#include "math.h" //libreria para las operaciones matematicas
-char texto[20];
-//Serial xbee (PA_2, PA_3);// comunicacion serial
-Serial xbee (PC_6, PC_7);// comunicacion serial
-Serial PC (PA_2, PA_3); //comunicacion con el hercules serial
-float valor;
-int main (){
-    xbee.baud(9600); //velocidad de transmicion
-    PC.baud(9600);
-    while(true){   
-     PC.scanf("%s[^\n]",texto);
-     xbee.printf ("RECIBE DATO: %s\n\r",texto);
-     xbee.scanf("%s[^\n]",texto);
-     PC.printf ("ENVIA DATOS: %s\n\r",texto);   
-     wait(0.1);
-           }
-}