Attempts with Sainsmart Motor Shield Not Working I received the sainsmart motor controller a few days ago, and am now having trouble testing it. The Arduino I am using is an Arduino Mega 2560. I thought it was an I2C communication issue but that wasn't working. So here I am now asking for help. 
Here is my wiring.


Here is my code:

#include &lt;AFMotor.h&gt;

AF_DCMotor motor(2);

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

 // turn on motor
 motor.setSpeed(200);

 motor.run(RELEASE);
}

void loop() {
 uint8_t i;

 Serial.print("tick");

 motor.run(FORWARD);
 for (i=0; i&lt;255; i++) {
  motor.setSpeed(i);  
  delay(10);
 }

 for (i=255; i!=0; i--) {
  motor.setSpeed(i);  
  delay(10);
 }

Serial.print("tock");

motor.run(BACKWARD);

 for (i=0; i&lt;255; i++) {
  motor.setSpeed(i);  
  delay(10);
 }

for (i=255; i!=0; i--) {
  motor.setSpeed(i);  
  delay(10);
 }


Serial.print("tech");
motor.run(RELEASE);
delay(1000);
 }


I also tried this one:

#include&lt;AFMotor.h&gt;
 AF_DCMotor motor2(2);
void setup() {
 // put your setup code here, to run once:
 motor2.setSpeed(255);
}

void loop() {
 // put your main code here, to run repeatedly:
 motor2.run(FORWARD);
  }


None of the two worked. If someone could help me that would be great. Thank You!!!
I figured out the problem. One of the terminals was damaged during transportation. Now it's all good. Thanks for the help.