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.
main.cpp@0:718cc5391604, 2020-02-14 (annotated)
- Committer:
- nigsonb
- Date:
- Fri Feb 14 16:15:05 2020 +0000
- Revision:
- 0:718cc5391604
RECEPTOR DE DATOS DEBER DE MAESTRIA PRIMERA PARTE
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nigsonb | 0:718cc5391604 | 1 | #include "mbed.h" |
| nigsonb | 0:718cc5391604 | 2 | #include "math.h" //libreria para las operaciones matematicas |
| nigsonb | 0:718cc5391604 | 3 | char texto[20]; |
| nigsonb | 0:718cc5391604 | 4 | //Serial xbee (PA_2, PA_3);// comunicacion serial |
| nigsonb | 0:718cc5391604 | 5 | Serial xbee (PC_10,PC_11););// comunicacion serial |
| nigsonb | 0:718cc5391604 | 6 | Serial PC (SERIAL_TX, SERIAL_RX); //comunicacion con el hercules serial |
| nigsonb | 0:718cc5391604 | 7 | float valor; |
| nigsonb | 0:718cc5391604 | 8 | int main (){ |
| nigsonb | 0:718cc5391604 | 9 | xbee.baud(9600); //velocidad de transmicion |
| nigsonb | 0:718cc5391604 | 10 | PC.baud(9600); |
| nigsonb | 0:718cc5391604 | 11 | while(true){ |
| nigsonb | 0:718cc5391604 | 12 | PC.scanf("%s[^\n]",texto); |
| nigsonb | 0:718cc5391604 | 13 | xbee.printf ("RECIBE DATO: %s\n\r",texto); |
| nigsonb | 0:718cc5391604 | 14 | xbee.scanf("%s[^\n]",texto); |
| nigsonb | 0:718cc5391604 | 15 | PC.printf ("ENVIA DATOS: %s\n\r",texto); |
| nigsonb | 0:718cc5391604 | 16 | wait(0.1); |
| nigsonb | 0:718cc5391604 | 17 | } |
| nigsonb | 0:718cc5391604 | 18 | } |