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
Revision 1:6c18d1209b0e, committed 2015-10-07
- Comitter:
- dwijaybane
- Date:
- Wed Oct 07 12:36:57 2015 +0000
- Parent:
- 0:4d026a6a21e1
- Commit message:
- updated comments
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 06 07:10:15 2015 +0000
+++ b/main.cpp Wed Oct 07 12:36:57 2015 +0000
@@ -1,10 +1,12 @@
-#include "mbed.h"
+#include "mbed.h" // Basic Library required for onchip peripherals
-Serial pc(USBTX, USBRX); // tx, rx
+/* Create Objects */
+Serial pc(USBTX, USBRX); // Create serial object named pc using USB Tx and Rx
+/* Main Program */
int main() {
- pc.printf("Hello World!\n\r");
- pc.printf("Type any characters\n\r");
+ pc.printf("Hello World!\n\r"); // Greeting message
+ pc.printf("Type any characters\n\r"); // Instruction for user to type
while(1) {
pc.putc(pc.getc()); //echo recieved character
}