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:34e36cf49880, 2021-02-10 (annotated)
- Committer:
- Simon_
- Date:
- Wed Feb 10 09:48:50 2021 +0000
- Revision:
- 0:34e36cf49880
Virtual COM port test code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Simon_ | 0:34e36cf49880 | 1 | #include "mbed.h" |
Simon_ | 0:34e36cf49880 | 2 | |
Simon_ | 0:34e36cf49880 | 3 | //------------------------------------ |
Simon_ | 0:34e36cf49880 | 4 | // Hyperterminal configuration |
Simon_ | 0:34e36cf49880 | 5 | // 9600 bauds, 8-bit data, no parity |
Simon_ | 0:34e36cf49880 | 6 | //------------------------------------ |
Simon_ | 0:34e36cf49880 | 7 | |
Simon_ | 0:34e36cf49880 | 8 | Serial pc(SERIAL_TX, SERIAL_RX); |
Simon_ | 0:34e36cf49880 | 9 | |
Simon_ | 0:34e36cf49880 | 10 | DigitalOut myled(LED1); |
Simon_ | 0:34e36cf49880 | 11 | |
Simon_ | 0:34e36cf49880 | 12 | int main() |
Simon_ | 0:34e36cf49880 | 13 | { |
Simon_ | 0:34e36cf49880 | 14 | int i = 1; |
Simon_ | 0:34e36cf49880 | 15 | pc.printf("Hello World !\n"); |
Simon_ | 0:34e36cf49880 | 16 | while(1) { |
Simon_ | 0:34e36cf49880 | 17 | wait(1); |
Simon_ | 0:34e36cf49880 | 18 | pc.printf("This program runs since %d seconds.\n", i++); |
Simon_ | 0:34e36cf49880 | 19 | myled = !myled; |
Simon_ | 0:34e36cf49880 | 20 | } |
Simon_ | 0:34e36cf49880 | 21 | } |