Quote:
|
Originally Posted by Workaphobia
Second, will Kevin's code work with non-quadrature encoders? I assume it wouldn't - in that case, is it difficult to write my own code to interface with them, or is it as simple as reading an input?
Third, is it possible to use encoders without interrupts, and just poll how many clicks have elapsed, or would polling only return whether or not it is currently clicked?
|
Kevin's code will work with non-quadrature encoders, as long as you don't hook anything else up to digital inputs 6 or 8. It will only count in one direction, though. You could remove the parts of his code that deal with quadrature fairly easily.
You can handle encoders without interrupts, as long as they tick slowly. If you can guarantee that you poll the pin at twice the rate it transitions, you would be able to poll it reliably.