Datasheet

30
30
31
31
31
31
32
32
32
33
33
33
34
34
35
35
35
35
35
36
36
36
36
37
37
37
37
38
38
39
40
40
41
43
43
Include the required libraries
Create the Adafruit_MotorShield object
Create the DC motor object
Connect to the Controller
Set default speed
Run the motor
Using Stepper Motors
Include the required libraries
Create the Adafruit_MotorShield object
Create the stepper motor object
Set default speed
Run the motor
Library Reference
class Adafruit_MotorShield;
Adafruit_MotorShield(uint8_t addr = 0x60);
void begin(uint16_t freq = 1600);
Adafruit_DCMotor *getMotor(uint8_t n);
Adafruit_StepperMotor *getStepper(uint16_t steps, uint8_t n);
void setPWM(uint8_t pin, uint16_t val); void setPin(uint8_t pin, boolean val);
class Adafruit_DCMotor
Adafruit_DCMotor(void);
void run(uint8_t);
void setSpeed(uint8_t);
class Adafruit_StepperMotor
Adafruit_StepperMotor(void);
void step(uint16_t steps, uint8_t dir, uint8_t style = SINGLE);
void setSpeed(uint16_t);
uint8_t onestep(uint8_t dir, uint8_t style);
void release(void);
Arduino Library Docs
Stacking Shields
Addressing the Shields
Writing Code for Multiple Shields
Resources
Motor ideas and tutorials
© Adafruit Industries https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino Page 3 of 43