Works with the parallax ping sensor. Uses a timer and interrupts to get the time and calculate the distance

Dependents:   CatPot_2v00_T_Sub CatPot_2v10_T_Sub CatPot_2v20_T_Sub CatPot_2v30_T_Sub

Fork of Ping by Joel Rosiene

Revision:
2:e252ca27589b
Parent:
0:1e4b66122368
Child:
3:b9760df91b3d
--- a/Ping.cpp	Sat Mar 12 22:32:06 2011 +0000
+++ b/Ping.cpp	Thu Dec 31 05:16:15 2015 +0000
@@ -48,7 +48,7 @@
 // -1 means not valid.
 {
     if(_Valid && ~_Busy) 
-        return ((_Time*_SPEED_OF_SOUND_CM)/1000);
+        return ((_Time*_SPEED_OF_SOUND_CM)/1000/2);
     else 
         return -1;
 }
\ No newline at end of file