Hello All,
The stepper library looks like it cuts through so many behind the scenes chores to control steppers but I've already run into a problem, I can not get the motor above 150 RPM no matter what when using the following (snipit of) code;
go = 1000;
if (phase == 2){
drillStepper.setSpeed(100);
drillStepper.step(go);
drillStepper.setSpeed(110);
drillStepper.step(go);
drillStepper.setSpeed(130);
drillStepper.step(go);
drillStepper.setSpeed(150);
drillStepper.step(go);
drillStepper.setSpeed(151); // faults here
digitalWrite(ledPin, HIGH);
drillStepper.step(4000);
phase = 0;
} // end of phase 2
but just scribbling a simple test together allows it to run at 300 RPM, any help is appreciated, thanks;
if (phase == 1){
digitalWrite(motorPin1, HIGH); //step
delayMicroseconds(10);
digitalWrite(motorPin1, LOW); //step
delayMicroseconds(400); // 400 min = +/- 300 rpm
} // end of phase 1