control for robotic arm that can play chess using a granular gripper
Dependencies: Encoder mbed HIDScope Servo MODSERIAL
Fork of chessRobot by
Diff: actuators.cpp
- Revision:
- 120:440f1516101b
- Parent:
- 118:49605b5bd802
- Child:
- 121:6d8f1bdcda05
diff -r e5136c02a00e -r 440f1516101b actuators.cpp --- a/actuators.cpp Wed Oct 28 12:17:49 2015 +0100 +++ b/actuators.cpp Wed Oct 28 11:22:48 2015 +0000 @@ -65,7 +65,7 @@ bool calibrating2 = false; double looseTime = 0; -bool calReady = false; +//bool calReady = false; // Create object instances // Safety Pin @@ -265,7 +265,7 @@ const double L2 = 0.120; // first arm in m const double L3 = 0.255; // servo arm in m const double Xmax = 0.3; -const double Xmin; = -0.3; +const double Xmin = -0.3; const double Ymax = 0.645; const double Ymin = 0.33; @@ -288,7 +288,6 @@ motor1SetSpeed = 0; motor2SetSpeed = 0; return false; - break; } motor1SetSpeed = (setXSpeed*cos((motor1Pos + motor2Pos)*PI/180) + \ setYSpeed*sin((motor1Pos + motor2Pos)*PI/180))/(L1*sin(motor2Pos*PI/180)); @@ -296,5 +295,6 @@ setYSpeed*(L2+L3)*sin((motor1Pos + motor2Pos)*PI/180) + \ setXSpeed*L1*cos(motor1Pos*PI/180) + \ setYSpeed*L1*sin(motor1Pos*PI/180))/(L1*(L2+L3)*sin(motor2Pos*PI/180)); + return true; } \ No newline at end of file