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@1:6c18d1209b0e, 2015-10-07 (annotated)
- Committer:
- dwijaybane
- Date:
- Wed Oct 07 12:36:57 2015 +0000
- Revision:
- 1:6c18d1209b0e
- Parent:
- 0:4d026a6a21e1
updated comments
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| dwijaybane | 1:6c18d1209b0e | 1 | #include "mbed.h" // Basic Library required for onchip peripherals |
| dwijaybane | 0:4d026a6a21e1 | 2 | |
| dwijaybane | 1:6c18d1209b0e | 3 | /* Create Objects */ |
| dwijaybane | 1:6c18d1209b0e | 4 | Serial pc(USBTX, USBRX); // Create serial object named pc using USB Tx and Rx |
| dwijaybane | 0:4d026a6a21e1 | 5 | |
| dwijaybane | 1:6c18d1209b0e | 6 | /* Main Program */ |
| dwijaybane | 0:4d026a6a21e1 | 7 | int main() { |
| dwijaybane | 1:6c18d1209b0e | 8 | pc.printf("Hello World!\n\r"); // Greeting message |
| dwijaybane | 1:6c18d1209b0e | 9 | pc.printf("Type any characters\n\r"); // Instruction for user to type |
| dwijaybane | 0:4d026a6a21e1 | 10 | while(1) { |
| dwijaybane | 0:4d026a6a21e1 | 11 | pc.putc(pc.getc()); //echo recieved character |
| dwijaybane | 0:4d026a6a21e1 | 12 | } |
| dwijaybane | 0:4d026a6a21e1 | 13 | } |
| dwijaybane | 0:4d026a6a21e1 | 14 |