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:
- 99:7030e9790b1d
- Parent:
- 98:25528494287d
- Child:
- 100:222c27f55b85
diff -r 25528494287d -r 7030e9790b1d actuators.cpp --- a/actuators.cpp Thu Oct 22 10:06:46 2015 +0200 +++ b/actuators.cpp Thu Oct 22 08:16:28 2015 +0000 @@ -53,6 +53,15 @@ const double servo_inc = servo_vel * motorCall; // Servo postion increment per cycle double servo_pos = 0; double servoPulsewidth = 0.0015; + double servoSpeed = 0; + + // Set calibration values + double motorCalSpeed = 10; // deg/sec + double returnSpeed = -10; + bool springHit = false; + float lastCall = 0; + bool calibrating1 = true; + bool calibrating2 = false; // Create object instances // Safety Pin @@ -231,7 +240,7 @@ } } - motorsEnable = false // turn motor's off again + motorsEnable = false; // turn motor's off again safetyOn = true; // turn safety on after callibration }