I have the Adafruit Motor Shield V2 and an Adafruit stepper motor. I have not soldered the shield onto the Arduino (which is an Uno) yet because I don't want to make anything permanent yet. I have the Arduino plugged into a DC wall adapter and have the VIN jumper in the shield, and the green power light on the shield is lit. This is how the stepper is connected. setup
As you can see in the picture, all the wires from the stepper are plugged in. The order of the wires is what it says it should be on the website, which is orange-pink-red-blue-yellow
. My sketch's code is an adapted version of the StepperExample from the Adafruit motor library. Here's the full code
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_StepperMotor *myMotor = AFMS.getStepper(513, 2);
void setup() {
Serial.begin(9600);
Serial.println("Stepper test!");
AFMS.begin();
myMotor->setSpeed(5);
}
void loop() {
myMotor->step(100, FORWARD, SINGLE);
}
But the stepper still doesn't move. Can anyone point out what I'm doing wrong here?
-
4You must solder the header pins to the shield. You can then plug and unplug that from the sockets of the arduino board, but you must solder the pins to the shield board for reliable electrical connection.Chris Stratton– Chris Stratton2014年05月12日 05:19:47 +00:00Commented May 12, 2014 at 5:19
-
2You have a lot of extra exposed wire that may cause problems if they touch. You should have little or no bare wire extending out of the screw terminals.Craig– Craig2014年05月12日 16:58:42 +00:00Commented May 12, 2014 at 16:58
1 Answer 1
As far as I know, you have to solder the header pins. Here is a nice video demonstrating the assembly: Motorshield V2 assembly
-
Ok, I'll try this later and see if it works.j_lentini– j_lentini2014年05月12日 09:57:17 +00:00Commented May 12, 2014 at 9:57
-
Also we removed the vin jumper when we attached an external power source. Cant really see on your pic whether its on or off.Darellon– Darellon2014年05月12日 09:59:29 +00:00Commented May 12, 2014 at 9:59