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: encoderBase.cpp
- Revision:
- 4:48d390356fba
- Parent:
- 3:c9df852ad9ac
diff -r c9df852ad9ac -r 48d390356fba encoderBase.cpp --- a/encoderBase.cpp Wed Feb 21 11:55:29 2018 +0000 +++ b/encoderBase.cpp Thu Feb 22 17:01:00 2018 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "QEI.h" #include "pins.h" -#include "constants.h" +#include "constants.cpp" //these lines setup the encoders for both wheels @@ -33,3 +33,10 @@ return (wheelRight.velocity(pulseRight)-wheelLeft.velocity(pulseLeft))/WHEEL_DISTANCE; } }buggy; + //temp functions to get the encoder speed +int encoderVelocityLeft(){ + return wheelLeft.velocity(encoderLeft.getPulses()); + } +int encoderVelocityRight(){ + return wheelRight.velocity(encoderRight.getPulses()); + } \ No newline at end of file