Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: EC.h
- Revision:
- 33:5fe65de5684c
- Parent:
- 32:297384f9d261
- Child:
- 34:b34dc495b3c8
--- 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();