The speed and accel/deaccel is set under void setup:
void setup() {
stepper.setMaxSpeed(6000);
stepper.setAcceleration(1000);
When i remove the trigger rules and remove the code that repeats it 4 times the stepper is rotating 90 degrees (using acceleration en deacceleration)
void loop()
{
// for(int shot = 0; shot < TotalShots; shot++)
{
{
// stepper.setCurrentPosition(0);
stepper.moveTo(pos);
stepper.run();
}
// delay(1000);
// digitalWrite(SHUTTER_PIN, LOW);
// delay(2000); // take shot
// digitalWrite(SHUTTER_PIN, HIGH);
}
// while(true) {} // execution does not proceed past this point
}