Nigson Burgos / Mbed 2 deprecated DEBER_COMUNICACION_SERIAL

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "math.h" //libreria para las operaciones matematicas
00003 char texto[20];
00004 //Serial xbee (PA_2, PA_3);// comunicacion serial
00005 Serial xbee (PC_10,PC_11);// comunicacion serial
00006 Serial PC (SERIAL_TX, SERIAL_RX); //comunicacion con el hercules serial
00007 float valor;
00008 int main (){
00009     xbee.baud(9600); //velocidad de transmicion
00010     PC.baud(9600);
00011     while(true){   
00012       PC.scanf("%s[^\n]",texto);
00013       xbee.printf ("%s\n\r",texto);
00014       PC.printf ("ENVIA DATOS: %s\n\r",texto);
00015        wait(0.1);
00016            }
00017 }