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: src/kangaroo.cpp
- Revision:
- 48:8f0e007bd305
- Parent:
- 45:0db0fc9f77b1
- Child:
- 49:3aaa790800ad
--- a/src/kangaroo.cpp Sun Dec 01 20:34:31 2013 +0000 +++ b/src/kangaroo.cpp Sun Dec 01 22:19:48 2013 +0000 @@ -13,8 +13,8 @@ //m1.setVel(-.2);//wait for the legs to go to stopping points //m2.setVel(-.2); - m1.setPos(3.1415/6); - m2.setPos(3.1415/6);//bring legs to hard stop + m1.setPos(3.1415/5); + m2.setPos(3.1415/5);//bring legs to hard stop led4=1; wait(3.0); @@ -25,6 +25,7 @@ m1.setPos(0); //-3.1415/2); m2.setPos(-3.1415/2); //bring legs to neutral position + m1.zero(); //rezero at neutral m2.zero(); @@ -37,11 +38,14 @@ led1=1; - setPoint(Point(1.0,-1.0,0)); - - led3=1; - m1.stop(); - m2.stop(); + //setPoint(Point(0,-.1,0)); + wait(3); + led3=0; + led1=0; + led2=0; + led4=0; + //m1.stop(); + //m2.stop(); } void Kangaroo::testEncoders(Serial &pc){ @@ -54,6 +58,8 @@ pc.printf("clix2: %i, rots2: %i\n",enc2.getPulses(), enc2.getRevolutions()); } +Point Kangaroo + float Kangaroo::getAngle(){ return (enc2.getAngle())+1.770973; }