|
Re: Troublesome encoder ISR
They're spinning pretty slowly -- the 'bot takes several seconds to move a meter, and the shaft it's on has a sprocket quite a bit larger than that on the wheels' shaft (48 teeth encoder/motor shaft : 15 teeth wheel shaft, IIRC), which slows down the tick rate on the encoder even more if I'm not mistaken.
Also, when my ISR is simply "++encoderCount", it accurately counts the number of ticks (but without sense of direction, obviously). My direction-aware ISR isn't enormously complicated; it doesn't seem like enough to make it miss ticks, though I certainly could be mistaken.
Next time I have access to the machine I'll experiment with turning the shaft, though.
Thank you for your reply. I'll let you know if I figure it out.
|