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:
- 95:94f02d01ebdf
- Parent:
- 94:28e274481b60
diff -r 28e274481b60 -r 94f02d01ebdf actuators.cpp --- a/actuators.cpp Wed Oct 21 12:03:43 2015 +0000 +++ b/actuators.cpp Wed Oct 21 12:09:45 2015 +0000 @@ -177,21 +177,10 @@ } void calibrateMotors(){ -<<<<<<< local safetyOn = false; redLed.write(0); greenLed.write(1); blueLed.write(1); while (calibrating1 || calibrating2){ if (calibrating1){ -======= - safetyOn = false; - bool calibrating1 = true; - bool calibrating2 = true; - double motorCalSpeed = 10; // deg/sec - while (calibrating1 || calibrating2){ - if (calibrating1){ ->>>>>>> other - motor1SetSpeed = motorCalSpeed; // deg/sec -<<<<<<< local redLed.write(1); greenLed.write(0); blueLed.write(1); if(safetyIn.read() !=1){ // check if arm reached safety position encoder1.setPosition(0); // set motor 1 cal angle @@ -228,27 +217,6 @@ } } -======= - if(safetyIn.read() !=1){ // check if arm reached safety position - calibrating1 = false; // done - motor1SetSpeed = 0; // brake motor - encoder1.setPosition(0); // set motor 1 cal angle - // move away - } - } - if (calibrating1){ - motor2SetSpeed = motorCalSpeed; // deg/sec - if(safetyIn.read() !=1){ // check if arm reached safety position - calibrating2 = false; // done - motor2SetSpeed = 0; // brake motor - encoder2.setPosition(0); // set motor 2 cal angle - // move away - } - } - writeMotors(); - wait(0.01f); - } ->>>>>>> other safetyOn = true; // turn safety on after callibration }