Gripper code for R5 bot

Dependents:   GrabTest R5 2016 Robotics Team 1

Revision:
0:f1aeb307ab68
Child:
1:92a09a39e546
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Gripper.h	Wed Feb 24 16:31:12 2016 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+//definitions for servo PWM settings in us
+#define GRIP_DEF 1500
+#define GRIP_OPEN 1700
+#define GRIP_CLOSE 1120
+#define WRIST_DEF 1500
+#define WRIST_UP 2000
+#define WRIST_DOWN 1500
+#define PWM_PER 20000
+
+class Gripper
+{
+    public:
+    //gripPin is pwm pin connected to gripper servo, wristPin is pwm pin connected to wrist servo
+    Gripper(PinName gripPin, PinName wristPin);
+    //closes gripper to fit target
+    void grip();
+    //fully opens gripper
+    void release();
+    //raises wrist to target angle
+    void lift();
+    //lowers wrist to grabbing angle
+    void lower();
+    
+    private:
+    PwmOut gripPwm;
+    PwmOut wristPwm;
+};
\ No newline at end of file