00001 /****************************************************************************************00002 * Date Created: 3/18/201000003 * Title: NBitWonder Serial Debugging Code Example00004 * Description: An example serial communication program that prints values to a computer00005 * screen using the printf command.00006 * Author: George Hadley00007 * Website: http://nbitwonder.com00008 ****************************************************************************************/00009 #include "mbed.h"00010
00011 Serial pc(USBTX,USBRX);
00012
00013 int main() {
00014 //print string values to pc terminal00015 pc.printf("An mbed serial practice exercise\n\r");
00016 pc.printf("Writes values to the PC serial window\n\n\r");
00017 pc.printf("These values could just as easily be debug information, instead of silly strings\n\r");
00018 pc.printf("Now isn't that easy?\n\r");
00019 //wait indefinitely00020 while(1) {
00021 }
00022 }