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@2:a361a088704a, 2014-11-16 (annotated)
- Committer:
- ChuckMcM
- Date:
- Sun Nov 16 06:46:27 2014 +0000
- Revision:
- 2:a361a088704a
- Parent:
- 1:e9d1c42a73ae
Adds \r to cover cases where auto CR is not enabled, syntax on the message to be a bit more readable.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| bcostm | 0:028fac66239d | 1 | #include "mbed.h" |
| bcostm | 1:e9d1c42a73ae | 2 | |
| 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 | |
| bcostm | 0:028fac66239d | 8 | Serial pc(SERIAL_TX, SERIAL_RX); |
| bcostm | 0:028fac66239d | 9 | |
| bcostm | 0:028fac66239d | 10 | DigitalOut myled(LED1); |
| bcostm | 0:028fac66239d | 11 | |
| bcostm | 0:028fac66239d | 12 | int main() { |
| bcostm | 0:028fac66239d | 13 | int i = 1; |
| ChuckMcM | 2:a361a088704a | 14 | pc.printf("Hello World !\r\n"); |
| bcostm | 0:028fac66239d | 15 | while(1) { |
| bcostm | 0:028fac66239d | 16 | wait(1); |
| ChuckMcM | 2:a361a088704a | 17 | pc.printf("This has been running for %d seconds.\r\n", i++); |
| bcostm | 0:028fac66239d | 18 | myled = !myled; |
| bcostm | 0:028fac66239d | 19 | } |
| bcostm | 0:028fac66239d | 20 | } |
| bcostm | 0:028fac66239d | 21 |