手動機アーム、ヌクレオ基盤のプログラムです(9/4)

Dependencies:   RcServo mbed

Fork of a_SPI_slave_arm_shudouki by F^3 RC 2班

Revision:
2:df4d6f7952b6
Parent:
1:9e95f48ea988
Child:
3:f200ae8fea88
diff -r 9e95f48ea988 -r df4d6f7952b6 main.cpp
--- a/main.cpp	Wed Aug 23 04:43:58 2017 +0000
+++ b/main.cpp	Thu Aug 24 14:21:45 2017 +0000
@@ -8,14 +8,14 @@
 
 SPISlave spi(PA_7,PA_6,PA_5,PA_4);
 
-RcServo sA(PA_1,500,2400,180);       //PwmOutのpin,minpulsewidth,maxpulsewidth,motionrange
-RcServo sB(PB_4,500,2100,180);
-RcServo sC(PB_5,500,2100,180);
-RcServo sD(PA_2,500,3000,180);
-RcServo sE(PA_11,500,2400,180);
+RcServo sA(PB_0,500,2400,180);       //PwmOutのpin,minpulsewidth,maxpulsewidth,motionrange
+RcServo sB(PA_9,500,2100,180);
+RcServo sC(PA_10,500,2100,180);
+RcServo sD(PA_11,500,3000,180);
+RcServo sE(PA_2,500,2400,180);
 RcServo sF(PA_3,500,3000,180);
-RcServo sG(PF_0,500,2400,180);
-M1 mH(PA_9,PA_10);     //pwm*2
+RcServo sG(PA_8,500,2400,180);
+M1 mH(PB_7,PB_6);     //pwm*2
 
 
 
@@ -67,7 +67,10 @@
 
         if(c==1) {
             // if((ButtonState >> BUTTONLEFT)&1 == 1) { // ◀で燃料掃き出し
-            // ??保留
+            mH.move(0.5);
+            wait(1);
+            mH.move(0);
+            
         }
 
         if(d==1) {
@@ -88,7 +91,9 @@
 
         if(e==1) {
             // if((ButtonState >> BUTTONRIGHT)&1 == 1) { // ‣でタンク掃き出し
-            //??保留
+            mH.move(-0.5);
+            wait(1);
+            mH.move(0);
         }
 
         if(f==1) {