|
Re: Automatic counter-Encoder
One thing to keep in mind when using interrupts, is that if you use a mechanical switch to trigger it, the mechanical switch doesn't cleanly fire just once. It tends to trigger the interrupt anywhere from 10 to 100 times. I learned this a couple of years ago with a mechanical mouse encoder hooked up to our robot. Optical switches don't have this problem.
I only bring this up because you don't say what type of switch you are using.
|