New QEI library with position (angle) outputs
Fork of QEI_modified by
Diff: QEI.h
- Revision:
- 1:894673d52596
- Parent:
- 0:5c2ad81551aa
- Child:
- 2:205d0280632a
--- a/QEI.h Thu Sep 02 16:48:55 2010 +0000 +++ b/QEI.h Mon Feb 22 09:02:41 2016 +0000 @@ -147,6 +147,12 @@ public: + volatile int pulses_; + + int angularvelocity; + int countArray[50]; + uint8_t arrayPtr; + typedef enum Encoding { X2_ENCODING, @@ -207,6 +213,10 @@ * @return Number of revolutions which have occured on the index channel. */ int getRevolutions(void); + + void Calculate(void); + + double getAngularSpeed(void); private: @@ -236,7 +246,7 @@ int prevState_; int currState_; - volatile int pulses_; +// volatile int pulses_; volatile int revolutions_; };