四輪オムニの足回りを動かすプログラム

Dependencies:   mbed

Revision:
0:39c2bb18192b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/motor/motor.hpp	Sat Oct 08 11:13:31 2022 +0000
@@ -0,0 +1,24 @@
+#ifndef MOTOR_
+#define MOTOR_
+
+#include <mbed.h>
+
+#if 0
+  ~example~
+    Motor name(ピン名1,ピン名2)でこのクラスを使うことができるようになる
+    name.revolution(pwmの値)でモータを回すことができる
+    name.reset()でモータの値を0にする
+#endif
+
+class Motor
+{
+public:
+    Motor(PinName pin_a,PinName pin_b);
+    void revolution(double);
+    void reset();
+private:
+    PwmOut motor1;
+    PwmOut motor2;
+};
+
+#endif
\ No newline at end of file