![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Encoder
Dependencies: mbed
Fork of Bewegungen by
Diff: MotorEncoder.h
- Revision:
- 1:e454e6f5d81a
--- /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