Download Print this page

Adafruit Motor Shield V2.0 Manual page 5

Advertisement

Drive a DC Motor
You can drive 2 DC motor with this shield. Here I will show you how to drive a DC
motor.
You need to do some preparing first:
Set SEN_A and SEN_B, connect the left 2 pins together with a jumper.
Connect MB_EN together with a jumper, as we are no going use an external power.
Connect your DC motor to Chanel 0 (OUT1 and OUT2).
Then open motor_dc example in the library. Upload the code to Seeeduino V4.2.
//
Demo function:The application method to drive the DC motor.
//
Author:Loovee (luweicong@seeed.cc)
//
2016-3-11
#include "MotorDriver.h"
MotorDriver motor;
void setup()
{
// initialize
motor.begin();
}

Advertisement

loading
Need help?

Need help?

Do you have a question about the Motor Shield V2.0 and is the answer not in the manual?

Questions and answers