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"); }