Gripper code for R5 bot
Dependents: GrabTest R5 2016 Robotics Team 1
Gripper.h
- Committer:
- j_j205
- Date:
- 2016-04-09
- Revision:
- 2:4857ea4719e1
- Parent:
- 1:92a09a39e546
- Child:
- 3:5e473aa5381f
File content as of revision 2:4857ea4719e1:
#ifndef GRIPPER_H #define GRIPPER_H #include "mbed.h" //definitions for servo PWM settings in us #define GRIP_DEF 1500 #define GRIP_OPEN 1700 #define GRIP_CLOSE 1500 #define WRIST_DEF 1500 #define WRIST_UP 1900 #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; }; #endif