10A Motor Shield Compatibility Questions & Sensor/Encoder Usage

I am brand new to Arduino and this is my first post to the forum. I am attempting to run a Traxxas Titan 12T 550 Brushed DC Motor with an Arduino UNO and a Cytron 10A Motor Shield (https://goo.gl/URQaSx) My external power for the DC motor comes from a Venom 8.6V NiMH battery pack, and I plan to power my Arduino with another small 9V battery.

So far, I've been able to run and control my motor speed and direction. The end goal of my project is to implement this setup into a vehicle, where I can use either a rotary encoder or a Hall effect sensor to have the vehicle stop at a specific distance (essentially have the motor accelerate and decelerate to where the vehicle comes to a complete stop at, say, 9.6 meters).

  • Does the motor shield make use of both interrupt pins on the UNO, and if so, is there no way that I can use a rotary encoder or Hall effect sensor to track the distance that my vehicle has traveled using interrupts?

  • Are there any other recommended ways to accomplish this task?

Any help is appreciated!

On the Uno only pins 2 and 3 are connected to direct interrupt channels, but all the pins are available to generate pin-change interrupts (there are 3 channels, one for each port, not pin). These days there is a library or two to make using pin-change interrupts easy.

Note that pin-change interrupts cover all the pins on the Uno, but not on the Mega, and are specific to AVR microcontrollers.

Pin change interrupts work well with encoders if you put both encoder signals onto pins in the same port.