Adafruit v2 Motor Shield Power

Hello,

I have bought a motor shield by Adafruit. I am trying to follow this guide (Install Software | Adafruit Motor Shield V2 | Adafruit Learning System) but unfortunately, my motor is not working. I am not sure what I am doing wrong.

  1. I have set up the following as you can see in the image. I am powering only the shield from 11.1V LiPo battery. Arduino is hopefully powered from the shield. I am not sure if I need to remove the Jumper in the shield but until now I haven' t done it. The orange and yellow wire is going directly to my DC motor the other two wires near the orange are my second DC motor.

  2. I have downloaded the library (which i think is the same as the v1 motor shield???) and I have uploaded the motor test sketch. This is the following:

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

#include <AFMotor.h>

AF_DCMotor motor(4);

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<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<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);
}

Any idea why this is not working? Do I need to supply some more information about something? I am using Arduino Mega! :slight_smile:

Oh i forgot! WHY MY ONBOARD LED IS NOT GREEN? All over the Internet i see green leds...

thanks guys...

xmarkx:
2. I have downloaded the library (which i think is the same as the v1 motor shield???)

Not sure why you think that since the documentation at Install Software | Adafruit Motor Shield V2 | Adafruit Learning System says fairly clearly "To use the shield on an Arduino, you'll need to install the Adafruit Motorshield v2 library. This library is not compatible with the older AF_Motor library used for v1 shields."

Perhaps try the newer library.

Steve

I have already installed the v1, so i have to somehow remove the v1 and install the v2. I actually paste the folder in the lib arduino folder but i think there may be a problem when 2 lib v1 and v2 are in the same folder.

It was actually the library. I had to remove all files related to v1 and then install the v2 lib. Thanks :slight_smile: