void step(int motor, float steps, float feedrate){ AccelStepper stepper; if (motor == TURNTABLE_STEPPER ){ stepper = turntable; } if (motor == LASER_STEPPER){ stepper = laser; } stepper.move(steps*SCALER); stepper.setSpeed(100); //motor.setAcceleration(acceleration); // Implementation without acceleration. while (stepper.distanceToGo() != 0) stepper.runSpeedToPosition(); //motor.run(); }
void turn(){ if(isTurning){ turntable.setSpeed(1000); turntable.move(10); turntable.runSpeed(); } }