George Hadley
/
SerialIntro
A sample serial program that prints basic values to a serial pc terminal
main.cpp
- Committer:
- nbitwonder
- Date:
- 2010-03-19
- Revision:
- 0:2ce0cffa46a6
File content as of revision 0:2ce0cffa46a6:
/**************************************************************************************** * 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) { } }