Encoder
Dependencies: mbed
Fork of Bewegungen by
Diff: MotorEncoder.h
- Revision:
- 1:e454e6f5d81a
diff -r 96f88638114b -r e454e6f5d81a MotorEncoder.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MotorEncoder.h Wed May 10 09:15:42 2017 +0000 @@ -0,0 +1,23 @@ +#ifndef MOTOR_ENCODER_H +#define MOTOR_ENCODER_H + +#include <cstdlib> +#include <mbed.h> + +//E. Hess +//MotorEncoder.h + +class MotorEncoder { + public: + MotorEncoder(PinName a, PinName b); + virtual ~MotorEncoder(); + void reset(); + void reset(short offset); + short read(); + operator short(); + + private: + TIM_TypeDef* TIM; +}; + +#endif \ No newline at end of file