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.
Dependencies: mbed
main.cpp@2:ba95dcca2d90, 2016-09-08 (annotated)
- Committer:
- fpapayannis
- Date:
- Thu Sep 08 01:07:34 2016 +0000
- Revision:
- 2:ba95dcca2d90
- Parent:
- 1:e9d1c42a73ae
- Child:
- 3:c0f6dcd350a8
UART3 Enviando informaci?n de una cadena ya prefijada
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| bcostm | 0:028fac66239d | 1 | #include "mbed.h" |
| fpapayannis | 2:ba95dcca2d90 | 2 | #include "Serial.h" |
| bcostm | 1:e9d1c42a73ae | 3 | //------------------------------------ |
| bcostm | 1:e9d1c42a73ae | 4 | // Hyperterminal configuration |
| bcostm | 1:e9d1c42a73ae | 5 | // 9600 bauds, 8-bit data, no parity |
| bcostm | 1:e9d1c42a73ae | 6 | //------------------------------------ |
| bcostm | 1:e9d1c42a73ae | 7 | |
| fpapayannis | 2:ba95dcca2d90 | 8 | #define SERIAL_TX P0_10 |
| fpapayannis | 2:ba95dcca2d90 | 9 | #define SERIAL_RX P0_11 |
| fpapayannis | 2:ba95dcca2d90 | 10 | #define LEDStick P0_22 |
| fpapayannis | 2:ba95dcca2d90 | 11 | |
| bcostm | 0:028fac66239d | 12 | Serial pc(SERIAL_TX, SERIAL_RX); |
| bcostm | 0:028fac66239d | 13 | |
| fpapayannis | 2:ba95dcca2d90 | 14 | DigitalOut myled(LEDStick); |
| bcostm | 0:028fac66239d | 15 | |
| bcostm | 0:028fac66239d | 16 | int main() { |
| bcostm | 0:028fac66239d | 17 | int i = 1; |
| fpapayannis | 2:ba95dcca2d90 | 18 | pc.baud(9600); |
| fpapayannis | 2:ba95dcca2d90 | 19 | pc.format(8,Serial::None,1); |
| bcostm | 0:028fac66239d | 20 | pc.printf("Hello World !\n"); |
| bcostm | 0:028fac66239d | 21 | while(1) { |
| bcostm | 0:028fac66239d | 22 | wait(1); |
| bcostm | 0:028fac66239d | 23 | pc.printf("This program runs since %d seconds.\n", i++); |
| bcostm | 0:028fac66239d | 24 | myled = !myled; |
| bcostm | 0:028fac66239d | 25 | } |
| bcostm | 0:028fac66239d | 26 | } |
| bcostm | 0:028fac66239d | 27 |