ec

Dependents:   F3RC

Fork of EC by ROBOSTEP_LIBRARY

Revision:
33:5fe65de5684c
Parent:
32:297384f9d261
Child:
34:b34dc495b3c8
diff -r 297384f9d261 -r 5fe65de5684c EC.h
--- a/EC.h	Wed Jul 04 04:21:37 2018 +0000
+++ b/EC.h	Wed Jul 04 04:36:42 2018 +0000
@@ -146,6 +146,19 @@
 
     /** @caution 先にsetDiameter_mmをしないと正しい値とならない
     @return 現在距離.
+    @code
+#include <mbed.h>
+#include "EC.h"
+Ec ec(PB_5, PB_4, NC, 500, 0.5);
+int main()
+{
+    ec.setDiameter_mm(48);
+    while(1) {
+        printf("%f\r\n", ec.getDistance_mm());
+        wait(0.1);
+    }
+}
+@endcode
     */
     double getDistance_mm();