Robot's source code
Dependencies: mbed
main.cpp
- Committer:
- Jagang
- Date:
- 2014-09-28
- Revision:
- 0:41149573d577
- Child:
- 3:573a0dc8383f
File content as of revision 0:41149573d577:
#include "mbed.h" #include "QEI.h" #include "Odometry.h" int main() { QEI qei_left(p15,p16,NC,1024,QEI::X4_ENCODING); QEI qei_right(p17,p18,NC,1024,QEI::X4_ENCODING); Odometry odometry(&qei_left,&qei_right,0.07,0.07,0.26); Serial pc(USBTX, USBRX); // tx, rx while(1) { wait(1); pc.printf("%f : %f : %f\n",odometry.getX()*100,odometry.getY()*100,odometry.getTheta()*180/3.14); } }