cansat_B 2019 / Mbed 2 deprecated Motor_TB6612_all_doing

Dependencies:   mbed

Revision:
3:0989b6368529
Parent:
2:9885740002da
--- a/main.cpp	Fri Nov 08 16:54:04 2019 +0000
+++ b/main.cpp	Mon Nov 11 12:44:03 2019 +0000
@@ -9,11 +9,25 @@
     while(1) {
         left = 100; //左モーター100%
         right = 100;//右モーター100%
-        wait(1.0);
-        left = 30;//左30%
-        right = 30;//右30%
-        wait(1.0);
-        printf("OK");
+        wait(3.0);
+        printf("直進\n\r");
+        left = -50;//左-50%(back)
+        right = -50;//右-50%
+        printf("バック\n\r");
+        wait(3.0);
+        left = 20; //左モーター10%
+        right = 100;//右モーター100%(右折)
+        printf("右折\n\r");
+        wait(3.0);
+        left = 100; //左モーター100%
+        right = 20;//右モーター10%(左折)
+        printf("左折\n\r");
+        wait(3.0);
+        left = 0; //左モーター100%
+        right = 0;//右モーター10%(左折)
+        printf("停止\n\r");
+        wait(3.0);
+        printf("OK\n\r");
     }
 }