|
Re: Arduino Mecanum drive using PWM?
I don't think that you'll be needing interrupts. The arduino is fast enough to control 4 PWM's. Also, don't use the unsigned longs. If forwardDuration is 10, strafeDuration is 100, and rotateDuration is 100, you will have a negative value for FR, which is unsigned. I don't know what happens on the arduino, but it may wrap around to some massive number.
EDIT: Depending on what you're using to control your motors, you may have better sucsess with analogWrite. Also, how are you testing to see the lag?
Last edited by magnets : 12-07-2013 at 15:16.
|