Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Recepto_Datos/main.cpp@1:7791182b8283, 2020-02-15 (annotated)
- 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?
| User | Revision | Line number | New 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 | } |