A sample serial program that prints basic values to a serial pc terminal

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
nbitwonder
Date:
Fri Mar 19 17:09:52 2010 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 2ce0cffa46a6 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Mar 19 17:09:52 2010 +0000
@@ -0,0 +1,22 @@
+/****************************************************************************************
+* Date Created: 3/18/2010
+* Title: NBitWonder Serial Debugging Code Example
+* Description: An example serial communication program that prints values to a computer
+*       screen using the printf command.
+* Author: George Hadley
+* Website: http://nbitwonder.com
+****************************************************************************************/
+#include "mbed.h"
+
+Serial pc(USBTX,USBRX);
+
+int main() {
+    //print string values to pc terminal
+    pc.printf("An mbed serial practice exercise\n\r");
+    pc.printf("Writes values to the PC serial window\n\n\r");
+    pc.printf("These values could just as easily be debug information, instead of silly strings\n\r");
+    pc.printf("Now isn't that easy?\n\r");
+    //wait indefinitely
+    while(1) {
+    }
+}
diff -r 000000000000 -r 2ce0cffa46a6 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Mar 19 17:09:52 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0