![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Colour sensors calibrated
Dependencies: mbed-rtos mbed Servo QEI
Fork of ICRSEurobot13 by
Diff: Sensors/Encoders/Encoder.h
- Revision:
- 20:70d651156779
- Parent:
- 5:56a5fdd373c9
diff -r 4b993a9a156e -r 70d651156779 Sensors/Encoders/Encoder.h --- a/Sensors/Encoders/Encoder.h Sun Apr 07 19:26:07 2013 +0000 +++ b/Sensors/Encoders/Encoder.h Tue Apr 09 15:33:36 2013 +0000 @@ -1,8 +1,10 @@ -// Eurobot13 Encoder.cpp +#ifndef ENCODER_H +#define ENCODER_H #include "QEI.h" #include "mbed.h" +#include "globals.h" class Encoder{ private: @@ -19,7 +21,7 @@ yellow.mode(PullUp); } - int getPoint(void){ + int getTicks(void){ return wheel.getPulses(); } @@ -27,3 +29,10 @@ return wheel.reset(); } }; + +#ifdef ENABLE_GLOBAL_ENCODERS + extern Encoder right_encoder; + extern Encoder left_encoder; +#endif + +#endif //ENCODER_H