Thanks for the help! it works. The Serial.println tip was also very useful.
#define SHUTTER_PIN 7
#define DIRECTION_PIN 8
#define STEPPER_PIN 9
int TotalShots = 4;
long StepsPerShot = 85924 / TotalShots; // 85924 is the total amound of steps te complete a rotation (200 x 26,7:1 planetgear x 16 microsteps)
void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
Serial.begin(9600);
Serial.println(StepsPerShot);
}
void loop() {
for(int shot = 0; shot < TotalShots; shot++)
{
for(int steps = 0; steps < StepsPerShot; steps++)
{
digitalWrite(STEPPER_PIN, HIGH);
delayMicroseconds(60); // speed of the stepper
digitalWrite(STEPPER_PIN, LOW);
delayMicroseconds(60);
}
delay(1000);
digitalWrite(SHUTTER_PIN, LOW);
delay(2000); // take shot
digitalWrite(SHUTTER_PIN, HIGH);
}
while(true) {} // execution does not proceed past this point
}