Nigson Burgos / Mbed 2 deprecated ReceptoR_Datos

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
nigsonb
Date:
Fri Feb 14 16:15:05 2020 +0000
Commit message:
RECEPTOR DE DATOS DEBER DE MAESTRIA PRIMERA PARTE

Changed in this revision

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 14 16:15:05 2020 +0000
@@ -0,0 +1,18 @@
+#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 ("RECIBE DATO: %s\n\r",texto);
+      xbee.scanf("%s[^\n]",texto);
+      PC.printf ("ENVIA DATOS: %s\n\r",texto);
+       wait(0.1);
+           }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Feb 14 16:15:05 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file