Here's what I had in mind:
This part before my setup(), defines the PCB, and also some versions will have a POT on an analogPin, so you see DownPotentiometer is defined in version 3.
#if defined PCB_Version_2_0
const int LEDpin = A1; //power indicator
const int analogPin = A2; //joystick connected to A2
const int buttonPin = A5; //program button on digital pin 2
const String splash = "Microphone Controller Version 2.0";
#elif defined PCB_Version_3_0
#define DownPotentiometer A6 //POT to regulate the max down speed (Ver 3 only)
const int LEDpin = A1; //Power indicator
const int analogPin = A3; //joystick connection pin
const int buttonPin = A5; //program button
const int potPin = A6; //potentiometer
const String splash = "Microphone Controller Version 3.0";
#elif defined PCB_Version_4_0
const int LEDpin = A5; //Power indicator
const int analogPin = A3; //joystick connection pin
const int buttonPin = 2; //program button
const String splash = "Microphone Controller Version 4.0";
#elif defined PCB_Version_4_2
const int LEDpin = A5; //Power indicator
const int analogPin = A2; //joystick connection pin
const int buttonPin = 2; //program button
const String splash = "Microphone Controller Version 4.2";
#endif
And then in my motor function if DownPotentiometer is defined, if reads the value from that POT, otherwise, it assumes there is no POT.
void motorDown(unsigned long reading) { //run the motor down (1 to 799 is 0% to 100%)
int maxSpeed = 799; //set max down speed to 100%
#ifdef DownPotentiometer //is there a POT for adjusting the max down speed?
int analogVal = analogRead(DownPotentiometer); //read the val, will be 0 to 1023
//map function: map(value, fromLow, fromHigh, toLow, toHigh)
maxSpeed = map (analogVal, 0,1023, 400, 799); //remap the val; 799 is 100% motor speed
#endif
//int mappedVal = fscale( joystick.down, joystick.center, 799, 1, reading, 4.5); //the curve is pos, not neg, b/c the map is inverted
int mappedVal = fscale( joystick.down, joystick.center - CenterDebounce, maxSpeed, 50, reading, 4.5); //the curve is pos, not neg, b/c the map is inverted
digitalWrite(motorUpPin, LOW); //going up
digitalWrite(motorDownPin, HIGH); //pulled low for motor ground
analogWriteSAH(mappedVal); //Set the PWM for the motor speed
Serial.print("Motor Down Speed: ");
Serial.println(mappedVal);
}