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

Dependencies:   mbed

Revision:
0:2ce0cffa46a6
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) {
+    }
+}