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.
Diff: Master.cpp
- Revision:
- 37:bf257a0154db
- Parent:
- 35:a4e89e78d034
- Child:
- 38:922f2584bdfd
- Child:
- 43:68faf056ed5c
--- a/Master.cpp Sun Nov 24 20:18:17 2013 +0000 +++ b/Master.cpp Sun Nov 24 20:38:59 2013 +0000 @@ -1,26 +1,27 @@ #include "mbed.h" -#include "include/zgeom.hpp" + +#include "Master.hpp" Serial pc(USBTX, USBRX); -int main() { +QEI mEnc1(p25, p26, NC, 1200, QEI::X4_ENCODING); //hip +QEI mEnc2(p23, p24, NC, 1200, QEI::X4_ENCODING);//knee + +Motor m1(p15,p17,p18,p21,mEnc1);//hip +Motor m2(p16,p19,p20,p22,mEnc2);//knee - Point p1(1,2,3); - Point p2(2,2,3); - - Line l1(p1,p2); - - Point p3(3,2,3); - - Point bLine[3] = {p1,p2,p3}; - - BezCurve b(bLine, sizeof(bLine)/sizeof(Point)); - - b.setAdot(.025); - b.startCurve(); +QEI bEnc1(p27, p28, p29, 1200, QEI::X4_ENCODING); //track +QEI bEnc2(p8, p9, p10, 1200, QEI::X4_ENCODING); //body + +Kangaroo kankan(m1,m2,bEnc1,bEnc2); + +int main() { while(1){ - pc.printf("%f\n",b.newPoint().x); - wait(2); + kankan.testEncoders(pc); + wait(.25); } + + + //kankan.zero(); }