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@26:53b793b7a82f, 2013-11-24 (annotated)
- Committer:
- calamaridudeman
- Date:
- Sun Nov 24 06:00:21 2013 +0000
- Revision:
- 26:53b793b7a82f
- Parent:
- 25:8a34b8d6cc6e
- Child:
- 28:21773a6fb6df
ready to test sensors and code up to motors and sensors. Still need path planning and higher-level control
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
calamaridudeman | 23:112c0be5a7f3 | 1 | #include "mbed.h" |
calamaridudeman | 25:8a34b8d6cc6e | 2 | |
calamaridudeman | 25:8a34b8d6cc6e | 3 | #include "Master.hpp" |
calamaridudeman | 22:4d85d989af08 | 4 | |
calamaridudeman | 23:112c0be5a7f3 | 5 | Serial pc(USBTX, USBRX); |
calamaridudeman | 23:112c0be5a7f3 | 6 | |
calamaridudeman | 26:53b793b7a82f | 7 | QEI mEnc1(p25, p26, NC, 1200, QEI::X4_ENCODING); //hip |
calamaridudeman | 26:53b793b7a82f | 8 | QEI mEnc2(p23, p24, NC, 1200, QEI::X4_ENCODING);//knee |
calamaridudeman | 25:8a34b8d6cc6e | 9 | |
calamaridudeman | 26:53b793b7a82f | 10 | Motor m1(p15,p17,p18,p21,mEnc1);//hip |
calamaridudeman | 26:53b793b7a82f | 11 | Motor m2(p16,p19,p20,p22,mEnc2);//knee |
calamaridudeman | 25:8a34b8d6cc6e | 12 | |
calamaridudeman | 26:53b793b7a82f | 13 | QEI bEnc1(p25, p26, p27, 1200, QEI::X4_ENCODING);//change pins!!!!!!!!!!!!!!!!!!!!!!! |
calamaridudeman | 26:53b793b7a82f | 14 | QEI bEnc2(p8, p9, p10, 1200, QEI::X4_ENCODING);//these too |
calamaridudeman | 26:53b793b7a82f | 15 | |
calamaridudeman | 26:53b793b7a82f | 16 | Kangaroo kankan(m1,m2,bEnc1,bEnc2); |
calamaridudeman | 25:8a34b8d6cc6e | 17 | |
calamaridudeman | 22:4d85d989af08 | 18 | int main() { |
calamaridudeman | 23:112c0be5a7f3 | 19 | |
calamaridudeman | 23:112c0be5a7f3 | 20 | while(1){ |
calamaridudeman | 26:53b793b7a82f | 21 | kankan.testEncoders(pc); |
calamaridudeman | 23:112c0be5a7f3 | 22 | wait(2); |
calamaridudeman | 23:112c0be5a7f3 | 23 | } |
calamaridudeman | 22:4d85d989af08 | 24 | } |