![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
vf
Dependencies: Servo ServoArm mbed
Fork of PES_Official by
Diff: Sources/Greifer.cpp
- Revision:
- 10:f76476943a6c
- Child:
- 11:292bdbd85a9c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/Greifer.cpp Wed May 03 13:54:51 2017 +0000 @@ -0,0 +1,34 @@ +#include "Robot.h" +#include "Declarations.h" + + + + + + +Greifer::Greifer(Servo* greifer) +{ + init(greifer); +} + +Greifer::Greifer() +{ + +} + +void Greifer::init(Servo* greifer) +{ + this->greifer = greifer; + greifer->calibrate(0.0015f, 180.0f); + greifer->position(85.0f); +} + +void Greifer::take() +{ + this->greifer->position(-150.0f); +} + +void Greifer::leave() +{ + this->greifer->position(85.0f); +} \ No newline at end of file