Stepper "setSpeed" problem

  pinMode (switchPin, INPUT);
  digitalWrite(switchPin, LOW);

You are explicitly turning off the internal pullup resistor. This REQUIRES that you have external pullup or pulldown resistors. Do you?

Where do you actually use the value in motSpeed to control the speed of the motor?