Nigson Burgos / Mbed 2 deprecated DEBER_COMUNICACION_SERIAL

Dependencies:   mbed

Committer:
nigsonb
Date:
Sat Feb 15 01:11:58 2020 +0000
Revision:
1:7791182b8283
Se realiza comunicacion serial entre las tarjetas STM32 Y F103RB

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nigsonb 1:7791182b8283 1 #include "mbed.h"
nigsonb 1:7791182b8283 2 #include "math.h" //libreria para las operaciones matematicas
nigsonb 1:7791182b8283 3 char texto[20];
nigsonb 1:7791182b8283 4 //Serial xbee (PA_2, PA_3);// comunicacion serial
nigsonb 1:7791182b8283 5 Serial xbee (PC_10,PC_11);// comunicacion serial
nigsonb 1:7791182b8283 6 Serial PC (SERIAL_TX, SERIAL_RX); //comunicacion con el hercules serial
nigsonb 1:7791182b8283 7 float valor;
nigsonb 1:7791182b8283 8 int main (){
nigsonb 1:7791182b8283 9 xbee.baud(9600); //velocidad de transmicion
nigsonb 1:7791182b8283 10 PC.baud(9600);
nigsonb 1:7791182b8283 11 while(true){
nigsonb 1:7791182b8283 12 PC.scanf("%s[^\n]",texto);
nigsonb 1:7791182b8283 13 xbee.printf ("%s\n\r",texto);
nigsonb 1:7791182b8283 14 PC.printf ("ENVIA DATOS: %s\n\r",texto);
nigsonb 1:7791182b8283 15 wait(0.1);
nigsonb 1:7791182b8283 16 }
nigsonb 1:7791182b8283 17 }