Datasheet
Using DC Motors
DC motors are used for all sort of robotic projects.
The motor shield can drive up to 4 DC motors bi-directionally. That means they can be driven forwards and backwards.
The speed can also be varied at 0.5% increments using the high-quality built in PWM. This means the speed is very
smooth and won't vary!
Note that the H-bridge chip is not meant for driving continuous loads of 1.2A, so this is for small motors. Check the
datasheet for information about the motor to verify its OK!
Connecting DC Motors
To connect a motor, simply solder two wires to the terminals and then connect them to either the M1, M2, M3, or M4.
Then follow these steps in your sketch
Include the required libraries
Make sure you #include the required libraries
Create the Adafruit_MotorShield object
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
© Adafruit Industries https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino Page 30 of 43