Tell us about yourself!
Complete Motor Guide for Robotics
Hello, absolutely correct! I kept wondering why he assumed it counts twice. and therefore he needs to divide by two. The only case would have been that he uses CHANGE rather than RISING or FALLING.I am trying to do the same for a motor with encoder and optocoupler, it seems that the optocoupler does mis count on low speeds! it basically counts more than once (interrupt is called 2~3 times) while the rotor blade is just leaving the optocoupler IR Led and receiver (i.e while going out)!Yet to try to figure this out! I already have a debounce for ~20 milliseconds and using a 65ohm resistor for the IR LED.