Daniel Garcia / Mbed 2 deprecated timer

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
danielgarciag
Date:
Sun Sep 30 21:15:01 2018 +0000
Commit message:
timer

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Sep 30 21:15:01 2018 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+
+Timer tiempo;
+Serial pc (USBTX,USBRX);
+DigitalIn BOTON (USER_BUTTON);
+
+
+int t=0;
+int main() {
+   while (1){
+   while (BOTON){}
+        
+   tiempo.start();
+   while (!BOTON){}
+   tiempo.stop();
+   t= tiempo.read_ms();
+   pc.printf("%d\n",t);
+   tiempo.reset();
+}}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Sep 30 21:15:01 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e95d10626187
\ No newline at end of file