Test

Revision:
0:2a1510763167
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hcsr04.h	Mon Jan 11 10:59:03 2021 +0000
@@ -0,0 +1,20 @@
+#ifndef HCSR04_H
+#define HCSR04_H
+#include "mbed.h"
+
+
+ 
+class HCSR04 {
+  public:
+    HCSR04(PinName t, PinName e);
+    long echo_duration();
+    long distance();
+ 
+    protected:
+        DigitalOut trig;
+        DigitalIn echo;
+        Timer timer;
+        long duration,distance_cm;
+};
+ 
+#endif
\ No newline at end of file