control for robotic arm that can play chess using a granular gripper

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

Files at this revision

API Documentation at this revision

Comitter:
annesteenbeek
Date:
Wed Oct 28 11:22:48 2015 +0000
Parent:
119:e5136c02a00e
Child:
121:6d8f1bdcda05
Commit message:
fixed small typos

Changed in this revision

actuators.cpp Show annotated file Show diff for this revision Revisions of this file
actuators.h Show annotated file Show diff for this revision Revisions of this file
--- 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
--- a/actuators.h	Wed Oct 28 12:17:49 2015 +0100
+++ b/actuators.h	Wed Oct 28 11:22:48 2015 +0000
@@ -43,6 +43,6 @@
 bool calibrateMotors();
 void writeMotors();
 void safety();
-void kinematics();
+bool kinematics();
 
 #endif 
\ No newline at end of file