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:7080ac98e9c2, 2017-10-28 (annotated)
- Committer:
- rockscofield
- Date:
- Sat Oct 28 23:36:38 2017 +0000
- Revision:
- 0:7080ac98e9c2
g
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rockscofield | 0:7080ac98e9c2 | 1 | #include "mbed.h" |
| rockscofield | 0:7080ac98e9c2 | 2 | |
| rockscofield | 0:7080ac98e9c2 | 3 | //------------------------------------ |
| rockscofield | 0:7080ac98e9c2 | 4 | // Hyperterminal configuration |
| rockscofield | 0:7080ac98e9c2 | 5 | // 9600 bauds, 8-bit data, no parity |
| rockscofield | 0:7080ac98e9c2 | 6 | //------------------------------------ |
| rockscofield | 0:7080ac98e9c2 | 7 | |
| rockscofield | 0:7080ac98e9c2 | 8 | Serial pc(SERIAL_TX, SERIAL_RX); |
| rockscofield | 0:7080ac98e9c2 | 9 | |
| rockscofield | 0:7080ac98e9c2 | 10 | DigitalOut myled(LED1); |
| rockscofield | 0:7080ac98e9c2 | 11 | |
| rockscofield | 0:7080ac98e9c2 | 12 | int main() |
| rockscofield | 0:7080ac98e9c2 | 13 | { |
| rockscofield | 0:7080ac98e9c2 | 14 | int i = 1; |
| rockscofield | 0:7080ac98e9c2 | 15 | pc.printf("Hello World !\n"); |
| rockscofield | 0:7080ac98e9c2 | 16 | while(1) { |
| rockscofield | 0:7080ac98e9c2 | 17 | wait(1); |
| rockscofield | 0:7080ac98e9c2 | 18 | pc.printf("This program runs since %d seconds.\n", i++); |
| rockscofield | 0:7080ac98e9c2 | 19 | myled = !myled; |
| rockscofield | 0:7080ac98e9c2 | 20 | } |
| rockscofield | 0:7080ac98e9c2 | 21 | } |