UNO with Pololu a4983 and Potentiometer

Hi there, I am working on a Stepper motor rig to pull a camera dolly weight being about 7lbs on a 45 degree incline at times along a 3’ track, so I need lots of holding torque - very slow speeds, and with manual control using a Potentiometer.

Here is my hardware list - which all works using my sketch and breadboard.

Arduino UNO
Pololu a4983 with voltage regulator - Goal is to power this with a 9v off the shelf battery - USB for now.
Stepper Motor: Unipolar/Bipolar, 200 Steps/Rev, 42x48mm, 4V, 1200mA - powered seperately from the UNO with a 12V 3.6amp lead acid battery
Potentiomenter

Here is my current sketch, as you can see I have been experimenting with POT code, but an stopping as I am starting to hear the Motor squeal and get very hot - never did get the POT to work btw.

I would love some suggestions on this please, very new with it all and suprised I have gotten as far as I have so far.

#define stepPin 7
#define dirPin 6
#define enablePin 5
///#define potPin A0 // set pullup on analog pin 0 

//pot
///int analogPin = 0;     // potentiometer wiper (middle terminal) connected to analog pin 0
// outside leads to ground and +5V
///int val = 0;           // variable to store the value read
// end pot

void setup()
{  
  Serial.begin(9600);
  Serial.println("Starting stepper exerciser.");
  
  // We set the enable pin to be an output
  pinMode(enablePin, OUTPUT);
  // then we set it HIGH so that the board is disabled until we
  // get into a known state.
  digitalWrite(enablePin, HIGH);
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
}


//Have the execution of the for-loop be based conditionally on some external event
unsigned char takeSteps = 1;  // global variable

void loop()
{

  // POT
 /// val = analogRead(analogPin);    // read the input pin
  ///Serial.println(val);             // debug value
  // end pot
  int j;
  digitalWrite(dirPin, HIGH);  // set step direction

  if (takeSteps)
  {

    digitalWrite(enablePin, LOW);  // enable driver
    delay(2);
    takeSteps = 0;
    for(j=0; j<=50; j++)
    {
      digitalWrite(stepPin, LOW);
      delay(2);
      digitalWrite(stepPin, HIGH);
      delay(100);
    }
    digitalWrite(enablePin, LOW);  // HIGH = current LOW = No current - disable driver - this is basically a stop delivering current command
  }
}

BWT - I seemed to have fixed the squealing Motor by re-wiring everthing

Sketch below works just fine - in one direction
Can anyone help with telling the motor that it needs to run in the reverse direction after running this sketch - specifically if the unit has been powered off after running the clockwise sketch!

#define stepPin 7
#define dirPin 6
#define enablePin 5
#define potPin A0 // potentiometer wiper (middle terminal) connected to analog pin A0

int val = 0;           // variable to store the POT 0-1024 value read

void setup()
{  
  Serial.begin(9600);
  Serial.println("Starting stepper exerciser.");

  // We set the enable pin to be an output
  pinMode(enablePin, OUTPUT);
  // then we set it HIGH so that the board is disabled until we
  digitalWrite(enablePin, HIGH);
  // get into a known state.
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
}


//Have the execution of the for-loop be based conditionally on some external event
unsigned char takeSteps = 1;  // global variable

void loop()
{

  int j; // set a step variable to check count
  digitalWrite(dirPin, LOW);  // set step direction
  // HIGH = counter clockwise
  // LOW =  clockwise

  if (takeSteps)
  {

    digitalWrite(enablePin, LOW);  // LOW = enable driver
    delay(2);
    takeSteps = 0; // number of steps taken upon setup
    for(j=0; j<=200; j++)
    {  
      val = analogRead(potPin);    // read the input pin
      // left turn higher value 1024 max = longer delay
      // right turn high pot value 0 min = shorter delay
      digitalWrite(stepPin, LOW); // power off
      delay(2);
      digitalWrite(stepPin, HIGH); // power on
      delay(val);
      Serial.println(val); // debug value, show me the POT value
    }
    digitalWrite(enablePin, LOW);  
    // LOW = current on
    // HIGH = No current - disable driver - this is basically a stop delivering current command
    Serial.println(val); // debug value. show me the pot value
  }
}