Now working with floats instead of long ints
Fork of HCSR04 by
Diff: hcsr04.h
- Revision:
- 1:ca0ff158918c
- Parent:
- 0:86b2086be101
--- a/hcsr04.h Mon Apr 14 08:23:09 2014 +0000 +++ b/hcsr04.h Tue Nov 03 14:42:13 2015 +0000 @@ -37,14 +37,14 @@ class HCSR04 { public: HCSR04(PinName t, PinName e); - long echo_duration(); - long distance(); + float echo_duration(); + float distance(); private: DigitalOut trig; DigitalIn echo; Timer timer; - long duration,distance_cm; + float duration,distance_cm; }; #endif \ No newline at end of file