Library for controlling ultrasonic ranging module HCSR04 Ported by hiawoood from arduino library orgininally created by ITead studio.
Diff: HCSR04.h
- Revision:
- 1:b30b99a74f6e
- Parent:
- 0:0bda99bb39a4
diff -r 0bda99bb39a4 -r b30b99a74f6e HCSR04.h --- a/HCSR04.h Tue Oct 18 14:32:12 2011 +0000 +++ b/HCSR04.h Sun May 08 20:09:39 2022 +0000 @@ -26,14 +26,14 @@ class HCSR04 { public: HCSR04(PinName t, PinName e); - long echo_duration(); - long distance(int sys); + int echo_duration(); + int distance(int sys); private: DigitalOut trig; DigitalIn echo; Timer timer; - long duration,distacne_cm,distance_inc; + int duration,distacne_cm,distance_inc; }; #endif \ No newline at end of file