user23272: having strange behavior with motor shield and steppers. when i'm trying to make onestep, motor just makes some high-frequent noise, but when i add Serial.println for debugging, it moves as intended.
what is going on here?
here is an example:

#include AFMotor.h //dunno how to put angle brackets here

AF_Stepper lrM(48, 1);

void rightStep() {  
  lrM.onestep(BACKWARD, INTERLEAVE);
}
void leftStep() {  
  lrM.onestep(FORWARD, INTERLEAVE);
}

void setup() {
  Serial.begin(9600);
  Serial.println("ready");
}

void loop() {
  rightStep();
//Serial.println("right");
}


user23841: My guess is Serial.println adds additional delay so stepper motor can react. Without it changes are way too fast (= high frequency noise) to do whole step.
Try to add delay(1); or more into the main loop.

23272: <p>having strange behavior with motor shield and steppers. when i'm trying to make <code>onestep</code>, motor just makes some high-frequent noise, but when i add <code>Serial.println</code> for debugging, it moves as intended.</p>

<p>what is going on here?</p>

<p>here is an example:</p>

<pre>
#include AFMotor.h //dunno how to put angle brackets here

AF_Stepper lrM(48, 1);

void rightStep() {  
  lrM.onestep(BACKWARD, INTERLEAVE);
}
void leftStep() {  
  lrM.onestep(FORWARD, INTERLEAVE);
}

void setup() {
  Serial.begin(9600);
  Serial.println("ready");
}

void loop() {
  rightStep();
//Serial.println("right");
}
</pre>
 23841: <p>My guess is <code>Serial.println</code> adds additional delay so stepper motor can react. Without it changes are way too fast (= high frequency noise) to do whole step.</p>

<p>Try to add <code>delay(1);</code> or more into the main loop.</p>
