2021 nhk A team

Dependencies:   mbed QEI led beep softPWM Servo_softpwm IR2302 lpf

Revision:
29:3bd99866801f
Parent:
28:a77d8d164630
Child:
30:00a513858a44
--- a/main.cpp	Fri Oct 29 12:58:17 2021 +0000
+++ b/main.cpp	Sat Oct 30 03:14:36 2021 +0000
@@ -29,12 +29,11 @@
 Timer setWait,nextWait,jumpWait;
 AnalogIn ph[3] = {PHOTO1,PHOTO2,PHOTO3};
 DigitalOut light[3] = {ROPE1,ROPE2,ROPE3};
-
 DigitalIn b(USER_BUTTON);
 
 int main()
 {
-    int i=0,j=0,k=2,l=0;//0,0,2,0
+    int i=0,j=0,k=3,l=0;//0,0,2,0
     double acc[3];     //加速度
     double abac[3]={0};//初期座標軸での加速度
     double angle[3];
@@ -61,9 +60,9 @@
     float motor=0;
     
     for(int i=0;i < 3; i++)servo[i].calibrate(0.00095, 90);
-    servoAngle[2] = 0.35;
-    servoAngle[0] = 0.35;
-    servoAngle[1] = 0.9;
+    servoAngle[0] = 0.2;
+    servoAngle[1] = 0.2;
+    servoAngle[2] = 0.82;
     for(i=0;i<3;i++) servo[i].write(servoAngle[i]);
     for(i=0; i<3; i++) light[i] = true;
     
@@ -190,7 +189,7 @@
 //            if(lpfZ < RELEASE_LINE)
             {
                 servoAngle[(k-1)%3] = 0.1;//サーボ離す
-                servoAngle[k%3] = 0.85;
+                servoAngle[k%3] = 0.7;
 //                l++;
                 l=1;
                 flyFlag = 0;