practical usage of quad encoder

08 Sep 2011

i know there is a simple way to do this and i'm just overlooking it. i need to equate a variable to # pulses from the encoder and am not certain how to make this association. also wondering if the qei code can be configured to call an interrupt. tnx much..

14 Sep 2011

Which QEI code were you looking at? The cookbook page here? Or the mbed hack which uses the LPC1768 hardware found here?

If it is the cookbook one then something simple like...

QEI wheel (p29, p30, NC, 624);

long pulses = wheel.getPulses();

should do the trick?