Quote:
|
Originally Posted by seanwitte
Quadrature doesn't require a state machine to decode the input. Use one channel on an interrupt and the other on a regular digital input. In the ISR, the value of the channel on the digital input provides the direction.
|
That can fail if the encoder wobbles back and forth in one place. Unless you keep track of the previous actions, you'll keep counting pulses in one direction and ignoring them in the other. It's not usually a problem with the kind of mechanical systems used in FIRST robots, but it did affect our "ground travel" sensors last season until we put in the necessary state machine.
Something like the encoder mentioned here would have made it easier to use more sensors without worrying too hard about interrupts.