Motor is operated by keyboard commands, encoder reads out position but not yet speed
Dependencies: HIDScope
Dependents: Project_motor Project_motor Motor_poscontrol Conceptcontroller_v_1_0
Fork of Encoder by
Diff: encoder.h
- Revision:
- 2:0998a8fd7727
- Parent:
- 1:2dd7853c911a
- Child:
- 4:69be34f39c9f
--- a/encoder.h Tue Oct 01 21:47:15 2013 +0000 +++ b/encoder.h Mon Nov 04 09:56:06 2013 +0000 @@ -26,7 +26,7 @@ @param int_a Pin to be used as InterruptIn! Be careful, as not all pins on all platforms may be used as InterruptIn. @param int_b second encoder pin, used as DigitalIn. Can be any DigitalIn pin, not necessarily on InterruptIn location */ - Encoder(PinName int_a, PinName int_b); + Encoder(PinName pos_a, PinName pos_b); /** Request position @returns current position in encoder counts */ @@ -43,7 +43,7 @@ void encoderFalling(void); void encoderRising(void); Timer EncoderTimer; - Timeout EncoderTimeout; + //Timeout EncoderTimeout; InterruptIn pin_a; DigitalIn pin_b; int32_t m_position;