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:a97acec6e904, 2019-10-30 (annotated)
- Committer:
- brett_slab
- Date:
- Wed Oct 30 07:18:54 2019 +0000
- Revision:
- 0:a97acec6e904
- Child:
- 1:792cb2614ee9
- Child:
- 3:efea9a991d8d
Initial Commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| brett_slab | 0:a97acec6e904 | 1 | #include "mbed.h" | 
| brett_slab | 0:a97acec6e904 | 2 | |
| brett_slab | 0:a97acec6e904 | 3 | #define PC_BAUD 115200 | 
| brett_slab | 0:a97acec6e904 | 4 | |
| brett_slab | 0:a97acec6e904 | 5 | Serial pc(PA_10, PA_9); //TX, RX | 
| brett_slab | 0:a97acec6e904 | 6 | |
| brett_slab | 0:a97acec6e904 | 7 | DigitalOut myled(LED1); | 
| brett_slab | 0:a97acec6e904 | 8 | |
| brett_slab | 0:a97acec6e904 | 9 | int main() | 
| brett_slab | 0:a97acec6e904 | 10 | { | 
| brett_slab | 0:a97acec6e904 | 11 | int i = 1; | 
| brett_slab | 0:a97acec6e904 | 12 | pc.printf("Hello World !\n"); | 
| brett_slab | 0:a97acec6e904 | 13 | pc.baud(PC_BAUD); | 
| brett_slab | 0:a97acec6e904 | 14 | while(1) { | 
| brett_slab | 0:a97acec6e904 | 15 | wait(1); | 
| brett_slab | 0:a97acec6e904 | 16 | pc.printf("This program runs since %d seconds.\n", i++); | 
| brett_slab | 0:a97acec6e904 | 17 | myled = !myled; | 
| brett_slab | 0:a97acec6e904 | 18 | } | 
| brett_slab | 0:a97acec6e904 | 19 | } |