Datasheet

Software
We'll use the built-in Arduino Stepper library (http://adafru.it/eRw), but you can manually
toggle the AIN1/AIN2/BIN1/BIN2 pins with your own favorite microcontroller setup
#include <Stepper.h>
// change this to the number of steps on your motor
#define STEPS 200
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 4, 5, 6, 7);
void setup()
{
Serial.begin(9600);
Serial.println("Stepper test!");
// set the speed of the motor to 30 RPMs
stepper.setSpeed(60);
}
void loop()
{
Serial.println("Forward");
stepper.step(STEPS);
Serial.println("Backward");
stepper.step(-STEPS);
}
Basically after you make the Stepper object with the 4 control pins, you can set the
rotational speed (in RPM) with setSpeed(rpm) and then step forward or backwards with
.step(steps) where steps is positive for 'forward' and negative for 'backward'
For more details, check out the Stepper library (http://adafru.it/eRw)
© Adafruit Industries
https://learn.adafruit.com/adafruit-tb6612-h-bridge-dc-stepper-motor-
driver-breakout
Page 14 of 16