謙一 永井 / Mbed 2 deprecated SRC2018Auto

Dependencies:   mbed QEI2

Revision:
0:2a0c62e53e9c
diff -r 000000000000 -r 2a0c62e53e9c Omuni.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Omuni.cpp	Wed Sep 12 09:07:30 2018 +0000
@@ -0,0 +1,54 @@
+#include "Omuni.h"
+#include "mbed.h"
+
+void motor_ff(){//フルスピード前
+    motor(0,CCW,0.3);
+    motor(1,CW,0.3);
+    motor(2,CW,0.6);
+}
+void motor_fs(){//スロウスピード前
+    motor(0,CCW,0.2);
+    motor(1,CCW,0.2);
+    motor(2,CW,0.4);
+}
+void motor_lf(){//フルスピード左
+    motor(0,CCW,0.5);
+    motor(1,CCW,0.5);
+    motor(2,STOP,0);
+}
+void motor_ls(){//スロウスピード左
+    motor(0,CCW,0.3);
+    motor(1,CCW,0.3);
+    motor(2,STOP,0);
+}
+void motor_bf(){//フルスピード後ろ
+    motor(0,CCW,0.3);
+    motor(1,CCW,0.3);
+    motor(2,CCW,0.6);
+}
+void motor_bs(){//スロウスピード後ろ
+    motor(0,CCW,0.2);
+    motor(1,CCW,0.2);
+    motor(2,CCW,0.4);
+}
+void motor_dr(){//斜め右上に進む
+    motor(0,STOP,0);
+    motor(1,CW,0.3);
+    motor(2,CW,0.3);
+}
+void motor_dl(){//斜め左上に進む
+    motor(0,CW,0.3);
+    motor(1,STOP,0);
+    motor(2,CW,0.3);
+}
+void motor_rf(){//フルスピード右
+    motor(0,CCW,0.5);
+    motor(1,CW,0.5);
+    motor(2,STOP,0);
+}
+void motor_s(){//ストップ
+    motor(0,STOP,0);
+    motor(1,STOP,0);
+    motor(2,STOP,0);
+}
+