예제 #1
0
void moveTo(int desiredPosition)
{
    leftStepper.setCurrentPosition(0);
    rightStepper.setCurrentPosition(0);
    leftStepper.moveTo(desiredPosition);
    rightStepper.moveTo(desiredPosition);
}
예제 #2
0
void home_y_axis(){
  
     motors_enable(); 
     while(!endStopSwitchReached(Y_ENDSTOP)){
       step(y, 100, 10000, 10000);
     }
     y.setCurrentPosition(0.0);
     y.setSpeed(10000.0); 
     motors_release();

}
예제 #3
0
void home_z_axis(){

    motors_enable(); 
     while(!endStopSwitchReached(Z_ENDSTOP)){
       step(z, 10, 80000, 10000);
     }
    
    z.setCurrentPosition(0.0);

    z.setSpeed(30000.0); 
    motors_release();
    
}