Datasheet
Adafruit_MotorShield(uint8_t addr = 0x60);
The constructor takes one optional parameter to specify the i2c address of the shield. The default address of the
constructor (0x60) matches the default address of the boards as shipped. If you have more than one shield in your
system, each shield must have a unique address.
void begin(uint16_t freq = 1600);
begin() must be called in setup() to initialize the shield. An optional frequency parameter can be used to specify
something other than the default maximum: 1.6KHz PWM frequency.
Adafruit_DCMotor *getMotor(uint8_t n);
This function returns one of 4 pre-defined DC motor objects controlled by the shield. The parameter specifies the
associated motor channel: 1-4.
Adafruit_StepperMotor *getStepper(uint16_t steps, uint8_t n);
This function returns one of 2 pre-defined stepper motor objects controlled by the shield.
The first parameter specifies the number of steps per revolution.
The second parameter specifies the associated stepper channel: 1-2.
void setPWM(uint8_t pin, uint16_t val);
void setPin(uint8_t pin, boolean val);
These are low-level functions to control pins on the on-board PWM driver chip. These functions are intended for
internal use only.
© Adafruit Industries https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino Page 35 of 43