Issue with using Adafruit Motor Shield with an Arduino Mega 2560

So I am working on a project that requires 2 12v stepper motors. I had gotten an Adafruit motor shield version 2.3 to run these two motors off of a 12v battery. I soldered the pins onto the board and then plugged it into the Arduino. I did check and the Arduino does appear to be an R3 not an R2. I set up the motors I attempted to run the Stepper test code included with the Adafruit library:

// Adafruit Motor shield library
// copyright Adafruit Industries LLC, 2009
// this code is public domain, enjoy!

#include <AFMotor.h>

// Connect a stepper motor with 48 steps per revolution (7.5 degree)
// to motor port #2 (M3 and M4)
AF_Stepper motor(200, 2);

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Stepper test!");

  motor.setSpeed(10);  // 10 rpm   

void loop() {
  Serial.println("Single coil steps");
  motor.step(100, FORWARD, SINGLE); 
  motor.step(100, BACKWARD, SINGLE); 

  Serial.println("Double coil steps");
  motor.step(100, FORWARD, DOUBLE); 
  motor.step(100, BACKWARD, DOUBLE);

  Serial.println("Interleave coil steps");
  motor.step(100, FORWARD, INTERLEAVE); 
  motor.step(100, BACKWARD, INTERLEAVE); 

  Serial.println("Micrsostep steps");
  motor.step(100, FORWARD, MICROSTEP); 
  motor.step(100, BACKWARD, MICROSTEP); 

When running the code I get outputs on the serial monitor, but the motors are not moving at all.

I have tested the motors and they are both operational. I have also run a code to test the I2c address to ensure that my board was recognizing the board and I got outputs of 0x60 and 0x70:

// --------------------------------------
// i2c_scanner
// Version 1
//    This program (or code that looks like it)
//    can be found in many places.
//    For example on the forum.
//    The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
//     Adapted to be as simple as possible by user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
// Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
// Version 6, November 27, 2015.
//    Added waiting for the Leonardo serial communication.
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.

#include <Wire.h>

void setup()

  while (!Serial);             // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");

void loop()
  byte error, address;
  int nDevices;


  nDevices = 0;
  for(address = 1; address < 127; address++ ) 
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    error = Wire.endTransmission();

    if (error == 0)
      Serial.print("I2C device found at address 0x");
      if (address<16) 
      Serial.println("  !");

    else if (error==4) 
      Serial.print("Unknow error at address 0x");
      if (address<16) 
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");

  delay(5000);           // wait 5 seconds for next scan

I’m not really sure where to go from here I am thinking maybe it is my solder job on the pins. It seems fine and slides right into the Arduino and neither side appears to be stuck from going all the way in.

The other thing is that my pins are slightly crooked. I am not sure that this would cause a large issue since they are all soldered and they are going into the Arduino all the way.

Overall I am assuming I am doing something wrong, so I’m gonna keep trying to figure out any possible solutions. If anyone has any idea of what could be wrong or has any other tests I could look into performing please let me know.

I have attached a few images of the Arduino and motor shield.

No need to download attachments they are the pictures in the post


Hi, Welcome to the forum. Karma for using code tags.

Can you please post a circuit diagram of your project? How did you work out that your steppers were operational? What model stepper, link to spec/data will help?

Thanks.. Tom... :)