Use the Arduino Motor Shield when you need your Arduino to MOVE STUFF!
Looking to drive some gear motors with your Arduino? It's a thinker, not a doer, so it needs some muscle to make motors move. That's where the official Arduino Motor Shield v3.0 comes into play!
The Arduino Motor Shield must be powered by an external power supply from either an AC-to-DC adapter (wall-wart) or a battery to the Shield's screw down terminals (Vin & GND) or at the Arduino's 2.1mm power jack . To avoid possible damage to the Arduino board on which the shield is mounted, we recommend using an external power supply that provides a voltage between 7 and 12V. If your motor requires more than 9V we recommend that you separate the power lines of the shield and the Arduino board on which the shield is mounted. This is possible by cutting the "Vin Connect" jumper placed on the back side of the shield. The absolute limit for the Vin at the screw terminals is 18V.
You can drive two Brushed DC motors by connecting the two wires of each one in the (+) and (-) screw terminals for each channel A and B. In this way you can control its direction by setting HIGH or LOW the DIR A and DIR B pins, you can control the speed by varying the PWM A and PWM B duty cycle values. The Brake A and Brake B pins, if set HIGH, will effectively brake the DC motors rather than let them slow down by cutting the power. You can measure the current going through the DC motor by reading the SNS0 and SNS1 pins. On each channel will be a voltage proportional to the measured current, which can be read as a normal analog input, through the function analogRead() on the analog input A0 and A1. For your convenience it is calibrated to be 3.3V when the channel is delivering its maximum possible current, that is 2A. There are also Freewheeling and Brake functions available for this shield.