Craig Evans
/
MeArm_Lab2_Task1
Lab2 Task 1
Diff: main.cpp
- Revision:
- 0:be56eef4c199
- Child:
- 1:ea13195efe98
diff -r 000000000000 -r be56eef4c199 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Nov 04 20:54:57 2014 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" +#include "MeArm.h" + +// create MeArm object - base, shoulder, elbow, gripper +MeArm arm(p21,p22,p23,p24); + +int main() +{ + arm.setTarget(50.0,100.0,120.0); // set x,y,z co-ordinate in mm + arm.solveInverseKinematics(); // solve for servo angles + arm.moveServos(); // update servos + + while (1) { + + } + +}