serial

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
steveshun
Date:
Thu Aug 22 19:02:23 2019 +0000
Commit message:
n/a

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 ea2b404743f0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 22 19:02:23 2019 +0000
@@ -0,0 +1,12 @@
+/* Program: A simple Timer
+Activate Tera Term terminal to test.
+*/
+#include "mbed.h"
+Timer t; // define Timer with name “t”
+Serial pc(USBTX, USBRX);
+int main() {
+t.start(); //start the timer
+pc.printf("Hello World!\n");
+t.stop(); //stop the timer
+pc.printf("The time taken was %f seconds\n", t.read()); //print to pc
+}
\ No newline at end of file
diff -r 000000000000 -r ea2b404743f0 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Aug 22 19:02:23 2019 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb
\ No newline at end of file