DC motor with 3(or more) programmed limits

Brinarpi:
First thing:

"Get the motor speed control working based on values in program variables (no user data entry)."

I dont understand exacly what do you mean with program variables?

I just mean something like this

byte motorSpeed = 123;
byte motorFwdPin = 5;
byte motorRevPin = 6;

void setup() {
  pinMode(motorFwdPin, OUTPUT);
  pinMode(motorRevPin, OUTPUT);
  analogWrite(motorRevPin, 0);
  analogWrite(motorFwdPin, motorSpeed);
}

void loop() {

}

But you still have not posted a link to the motor driver you are using so that code may not be suitable.

...R