![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Gripper and Color sensor basic functionality testing.
Dependencies: mbed
gripper.h
- Committer:
- z_g13
- Date:
- 2016-03-26
- Revision:
- 0:b30091b30223
File content as of revision 0:b30091b30223:
#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 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; }; #endif