A library for the HCSR04 sensor. work with interrupt

Dependents:   AdrianLysShow AdrianLysShow

A small library for the HCSR04 sensor. works with interrupt on the egde of the echo

link to datasheet: http://www.micropik.com/PDF/HCSR04.pdf

Revision:
1:e3a37f4015da
Parent:
0:9f4365d41bf1
--- a/HCSR04.h	Tue Apr 28 14:46:20 2015 +0000
+++ b/HCSR04.h	Wed Apr 29 06:12:22 2015 +0000
@@ -2,9 +2,8 @@
 //Class for measure distance with the HCSR04 sensor
 /*
 Eksemple
-void distance(long Duration) {
-      //  long distance = sensor.distance(1);
-        printf("Distance: %d   \r",Duration);    
+void distance(long Distance) {      
+        printf("Distance: %d   \r",Distance);    
 }
 
 int main()
@@ -17,6 +16,7 @@
 
     }
 }
+Datasheet: http://www.micropik.com/PDF/HCSR04.pdf
 */
 #include "mbed.h"
 typedef void (*callback_type)(long);