Juan Angel García
/
9_3
Temporizador
Revision 0:86a1411f75a6, committed 2017-03-09
- Comitter:
- jangelgm
- Date:
- Thu Mar 09 21:41:25 2017 +0000
- Commit message:
- Temporizador
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 86a1411f75a6 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Mar 09 21:41:25 2017 +0000 @@ -0,0 +1,13 @@ +/* Program Example 9.3: A simple Timer example, from mbed website. +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("Tiempo transcurrido de %f segundos\n", t.read()); //print to pc +} \ No newline at end of file
diff -r 000000000000 -r 86a1411f75a6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 09 21:41:25 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file