Frecuencimetro

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
oscarvzfz
Date:
Mon May 11 05:07:29 2015 +0000
Commit message:
Frecuencimetro

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 2603d71705a6 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 11 05:07:29 2015 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+Timer t;
+InterruptIn I(p5);
+int a=0;
+ 
+void arriba() 
+{
+t.start();   
+}
+void abajo() 
+{
+t.stop();
+a=t.read_ms(); 
+t.reset();
+}
+
+int main() 
+{
+    while(1)
+    { 
+    printf("%i ms\n\r",a);
+    I.rise(&arriba);   
+    I.fall(&abajo);    
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 2603d71705a6 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon May 11 05:07:29 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file