hello, I'm working on a new project and I'm using this small stepper motor from yourduino.com. I'm controlling the position of the stepper motor using a 10K potentiometer and it does rotates according to the pot, but it jitters at any position. What could be cousing this jittering?. I tried the knob code from arduino.cc and still jitters. I replaced the pot with a 1.2 kohms fix resistor and it does not jitters when stoped. Is the code missing something? HELP, no really HELP.
#include STEPS 100
Stepper stepper(STEPS,8,10,9,11);
int previous = 0;
void stup ()
{
stepper.setSpeed (160);
}
void loop ()
(
int val = map (analogRead(0), 0, 1023, 0, 2046); // 2046 will turn the stepper motor 1 full revolution to 180 degrees of pot's turn.
stepper.step(val - previous);
previous = val;
}