I'm using this stepper : 42BYGHW811
datasheet: http://www.phidgets.com/documentation/P ... asheet.pdf
Using the motor shield v1, I'm able to move it clockwise (FORWARD I guess) but no backwards.
well, actually I'm able to do it, but not everytime. The stepper goes FORWARD almost always but sometimes it stops go BACKWARDs for a couple of steps and then goes FORWARD again.
I don't think it is from my code which is derivable of the example code and it's only a debugging code.
I'm using a external power supply. It provides an Input: 23V ~50 Hz 23.5 W and an Output: 1000mA and goes from 1.5V to 12V, as I regulate it.
Could you help me with this?
Code: Select all
// 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(200, 1);
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Stepper test!");
motor.setSpeed(150); // 160 rpm //stepper
}
void loop() {
delay(2000);
motor.step(200, BACKWARD,DOUBLE);
delay(2000);
motor.step(200, FORWARD, DOUBLE);
}