![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
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:
- 86:a5f48ae7096e
- Parent:
- 85:03dc24043236
- Child:
- 87:7cc7d4d68ef7
--- a/actuators.cpp Tue Oct 20 15:28:11 2015 +0200 +++ b/actuators.cpp Tue Oct 20 15:43:54 2015 +0200 @@ -90,6 +90,9 @@ // start the timer t.start(); + motorsEnable = true; + calibrateMotors(); // start calibration procedure + motorsEnable = false; } @@ -176,7 +179,7 @@ if(safetyIn.read() !=1){ // check if arm reached safety position calibrating1 = false; // done motor1SetSpeed = 0; // brake motor - encoder1.setValue(0); // set motor 1 cal angle + encoder1.setPosition(0); // set motor 1 cal angle } } if (calibrating1){ @@ -184,7 +187,7 @@ if(safetyIn.read() !=1){ // check if arm reached safety position calibrating2 = false; // done motor2SetSpeed = 0; // brake motor - encoder2.setValue(0); // set motor 2 cal angle + encoder2.setPosition(0); // set motor 2 cal angle } } wait(0.2f);