Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Servo ServoArm
Fork of PES_Yanick by
Diff: Sources/Arm.cpp
- Revision:
- 8:593f82e66bdf
- Parent:
- 6:ba26dd3251b3
- Child:
- 9:ac362674c480
--- a/Sources/Arm.cpp Wed Apr 26 14:09:08 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#include "Robot.h"
-#include "Declarations.h"
-
-
-Arm::Arm(){
-}
-
-Arm::Arm(Servo* servoArm){
- init(servoArm);
-}
-
-void Arm::init(Servo* servoArm){
- this->servoArm = servoArm;
-
- this->servoArm->calibrate(0.0015f, 180.0f);
- this->servoArm->position(COLLECT_POS);
-}
-
-void Arm::collecttodown(int* done){
- static float pos=COLLECT_POS;
- if(pos>TAKE_POS) {
- pos-=0.5f;
- this->servoArm->position(pos);
- }
- else{
- *done = 1;
- }
-}
-
-void Arm::downtocollect(int* done){
- static float pos=TAKE_POS;
- if(pos<COLLECT_POS) {
- pos+=0.5f;
- this->servoArm->position(pos);
- }
- else{
- *done = 1;
- }
-}
-
-void Arm::collecttoback(int* done){
- static float pos=COLLECT_POS;
- if(pos<RELEASE_POS) {
- pos+=0.5f;
- this->servoArm->position(pos);
- }
- else{
- *done = 1;
- }
-}
-
-void Arm::backtocollect(int* done){
- static float pos=RELEASE_POS;
- if(pos>COLLECT_POS) {
- pos-=0.5f;
- this->servoArm->position(pos);
- }
- else{
- *done = 1;
- }
-}
\ No newline at end of file
