I want to power two motors with the arduino motor shield, and use the external interrupts for tracking encoders.
But the motor shield uses pin 3 for PWM for motor A, and interrupt1 is also on pin 3.
Am I correct that I can't use this combination?
I want to power two motors with the arduino motor shield, and use the external interrupts for tracking encoders.
But the motor shield uses pin 3 for PWM for motor A, and interrupt1 is also on pin 3.
Am I correct that I can't use this combination?
You are correct. You can work around the problem by cutting the trace to Pin 3 on the motor shield and wiring the trace to an unused PWM pin.
Thanks.
I might try pin change interrupts, as well. Doesn't seem that difficult, and I have two encoders with two channels each, so it'd give me better resolution.
I should say, though, that this is all for a slow, wheeled robot. I could easily do the encoders in loop() with event checkers (probably one change/few ms), but I'm trying to experiment as much as possible. Now just to find the time...