I'm pretty new to using this motor shield, and even the arduino actually, and I tried following a tutorial over at ladyada.net, but I couldn't get it. This is the code I'm using with a ladyada motor shield and 6V motor:
#include <AFMotor.h>
AF_DCMotor motor(3, MOTOR12_64KHZ); // create motor #2, 64KHz pwm
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor test!");
motor.setSpeed(200); // set the speed to 200/255
}
void loop() {
motor.run(FORWARD);
}
I'm connecting the motor to the M3 pins, but it still won't move. Can anybody help me with what I'm doing wrong? Maybe connecting it wrong? I don't know, and I'm stuck. Thank you in advance!
I added the delay, but it still doesn't work. And I don't really know what you mean by the jumper for the power. I tried it connected to the computer. As for the picture, it would not be possible for me to as of now, but I will try later. But it's connected the same way as in the image on the tutorial just in M3 instead. Thank you! The help is really appreciated
The jumper is the (only) jumper on the Adafruit Motor Shield.
If you use only the USB bus to power the Arduino and the motor, that is not enough. Do you use a power supply for the Arduino (as in the tutorial), what kind of power supply ?