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.
Master.cpp
- Committer:
- calamaridudeman
- Date:
- 2013-11-24
- Revision:
- 28:21773a6fb6df
- Parent:
- 26:53b793b7a82f
- Child:
- 29:33c5c61f1068
- Child:
- 35:a4e89e78d034
File content as of revision 28:21773a6fb6df:
#include "mbed.h" #include "Master.hpp" Serial pc(USBTX, USBRX); 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 QEI bEnc1(p27, p28, p29, 1200, QEI::X4_ENCODING);//change pins!!!!!!!!!!!!!!!!!!!!!!! QEI bEnc2(p8, p9, p10, 1200, QEI::X4_ENCODING);//these too //Kangaroo kankan(m1,m2,bEnc1,bEnc2); int main() { while(1){ //kankan.testEncoders(pc); pc.printf("m1: %i, enc1: %i\n",m1.getPos(), mEnc1.getPulses()); wait(.5); } }