stepper motor control

I need a simple peace of code written that will make a stepper motor do a few things.

I am using the stepper driver TB6600 and a nema 23 stepper motor

  1. step counter clockwise 3200 steps
  2. pause 2 seconds
  3. step clockwise 800 steps
  4. pause 2 seconds
  5. step clockwise 800 steps
  6. pause 2 seconds
  7. step clockwise 800 steps
  8. pause 2 seconds
  9. step clockwise 800 steps
  10. pause 2 seconds
  11. repeat

ena+ pin 2
ena- pin gnd
dir+ pin 3
dir- pin gnd
pul+ pin 4
pul- pin gnd

I do need the ability to control the speed of the stepper in the code.

I do not need any interface. i just need it to run this routine over and over for testing purpose.

let me know how this goes

 int PUL=4; //define Pulse pin
int DIR=3; //define Direction pin
int ENA=2; //define Enable Pin
void setup() {
  pinMode (PUL, OUTPUT);
  pinMode (DIR, OUTPUT);
  pinMode (ENA, OUTPUT);
    digitalWrite(ENA,LOW);

}

void loop() {
  //take the 3200 counterclockwise
  
  for (int i=0; i<3200; i++)   
  {
    stepCounterClockwise();
  }
  delay(2000);
  for (int i=0; i<800; i++)   
  {
    stepClockwise();
  }
  delay(2000);
  for (int i=0; i<800; i++)   
  {
    stepClockwise();
  }
  delay(2000);
for (int i=0; i<800; i++)   
  {
    stepClockwise();
  }
  delay(2000);
for (int i=0; i<800; i++)   
  {
    stepClockwise();
  }
  delay(2000);
}
//a single revolution at shared settings takes 200 pulses
void stepClockwise()
{   
  
    digitalWrite(DIR,LOW);
    digitalWrite(PUL,HIGH);
    delayMicroseconds(50);
    digitalWrite(PUL,LOW);
    delayMicroseconds(50);
  
}
void stepCounterClockwise()
{
  
    digitalWrite(DIR,HIGH);
    digitalWrite(PUL,HIGH);
    delayMicroseconds(50);
    digitalWrite(PUL,LOW);
    delayMicroseconds(50);
  
}