parent
6148b4bca5
commit
6d1c70948f
|
|
@ -42,10 +42,10 @@ void setup()
|
|||
//setting up some default values for maximum speed and maximum acceleration
|
||||
Serial.println("Default speed: 400 steps/s, default acceleration: 800 steps/s^2.");
|
||||
stepper.setMaxSpeed(100000); //SPEED = Steps / second
|
||||
stepper.setAcceleration(80à00); //ACCELERATION = Steps /(second)^2
|
||||
stepper.setAcceleration(80000); //ACCELERATION = Steps /(second)^2
|
||||
stepper.disableOutputs(); //disable outputs
|
||||
stepper2.setMaxSpeed(100000); //SPEED = Steps / second
|
||||
stepper2.setAcceleration(8à000); //ACCELERATION = Steps /(second)^2
|
||||
stepper2.setAcceleration(80000); //ACCELERATION = Steps /(second)^2
|
||||
stepper2.disableOutputs(); //disable outputs
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ void checkSerial() //function for receiving the commands
|
|||
|
||||
PrintCommands2(); //Print the commands for controlling the motor
|
||||
break;
|
||||
case '1': //P uses the move() function of the AccelStepper library, which means that it moves relatively to the current position.
|
||||
case '1': //avancer
|
||||
|
||||
receivedSteps = Serial.parseFloat(); //value for the steps
|
||||
receivedSpeed = Serial.parseFloat(); //value for the speed
|
||||
|
|
@ -292,7 +292,7 @@ void checkSerial() //function for receiving the commands
|
|||
//example: P2000 400 - 2000 steps (5 revolution with 400 step/rev microstepping) and 400 steps/s speed
|
||||
//In theory, this movement should take 5 seconds
|
||||
break;
|
||||
case '2': //P uses the move() function of the AccelStepper library, which means that it moves relatively to the current position.
|
||||
case '2': //reculer
|
||||
|
||||
receivedSteps = Serial.parseFloat(); //value for the steps
|
||||
receivedSpeed = Serial.parseFloat(); //value for the speed
|
||||
|
|
@ -306,7 +306,7 @@ void checkSerial() //function for receiving the commands
|
|||
//example: P2000 400 - 2000 steps (5 revolution with 400 step/rev microstepping) and 400 steps/s speed
|
||||
//In theory, this movement should take 5 seconds
|
||||
break;
|
||||
case '3': //P uses the move() function of the AccelStepper library, which means that it moves relatively to the current position.
|
||||
case '3': //a gauche
|
||||
|
||||
receivedSteps = Serial.parseFloat(); //value for the steps
|
||||
receivedSpeed = Serial.parseFloat(); //value for the speed
|
||||
|
|
@ -320,7 +320,7 @@ void checkSerial() //function for receiving the commands
|
|||
//example: P2000 400 - 2000 steps (5 revolution with 400 step/rev microstepping) and 400 steps/s speed
|
||||
//In theory, this movement should take 5 seconds
|
||||
break;
|
||||
case '4': //P uses the move() function of the AccelStepper library, which means that it moves relatively to the current position.
|
||||
case '4': //a droite.
|
||||
|
||||
receivedSteps = Serial.parseFloat(); //value for the steps
|
||||
receivedSpeed = Serial.parseFloat(); //value for the speed
|
||||
|
|
|
|||
Loading…
Reference in New Issue