I just bought motor shield like this
http://www.cutedigi.com/arduino-shields/motor-driver-shield-for-arduino.htmlThen follow the step, till I download the example sketch:
// 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(48, 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(500, FORWARD, SINGLE);
}
Is there anyone knows why my stepper just turn back and forth? what is wrong with the code?