Here's my approach to button control of motors 1 & 2; whattya think?
I have to update safeToMove() fcn to use the new 2D array approach. I started down the path of separate variables for each button, direction, motor, ect.. and it got super messy.
I get the rest of my hardware tomorrow, hopefully can give this a run outside of the IDE 
#include <SabertoothSimplified.h>
SabertoothSimplified ST;
// Connections to make from arduino to sabertooth:
// Arduino TX->1 -> Sabertooth S1
// Arduino GND -> Sabertooth 0V
//state declarations
int motorState[2][1]; //2 rows, 1 columns each. {motor1{currentState}, motor2{currentState}}; -1=REV, 0=OFF, 1=FWD
int buttonUpState[2][2]; //{{0,1},{0,1}} -->2 rows, 2 columns each. {switch1{current, previous}, switch2{current,previous}}
int buttonDnState[2][2];
int limitUpState[2][2];
int limitDnState[2][2];
//pin declarations
int buttonUpPin[2] = {2,4}; //{switch1-pin,switch2-pin}
int buttonDnPin[2] = {3,5};
int limitUpPin[2] = {9,7};
int limitDnPin[2] = {8,6};
void setup()
{
for (int i = 0; i < 2; i++) {
pinMode(buttonUpPin[i],INPUT);
pinMode(buttonDnPin[i],INPUT);
pinMode(limitUpPin[i],INPUT);
pinMode(limitDnPin[i],INPUT);
ST.motor(i+1,0); //stop motor
motorState[i][0] = 0; //set motor state to stopped
}
updateCurrentStates();
updatePrevStates();
SabertoothTXPinSerial.begin(9600); // This is the baud rate you chose with the DIP switches.
}
//functions
/*bool safeToMove(int motorNum, int dirByte){
bool result;
if (motorNum == 1){ //motor1
if (motor1State == 0){ //motor currently stopped
if (dirByte > 0){ //move UP/fwd
if (digitalRead(motor1Ulm)==HIGH){ //motor1 upper limit HIGH, means curtain is fully open
result == false;
}
else{
result == true;
}
}
else{ //move DOWN/reverse
if (digitalRead(motor1Dlm)==HIGH){ //motor1 down limit HIGH, means curtain is fully closed
result == false;
}
else{
result == true;
}
}
}
else{ //motor currently moving in fwd or rev
result = false;
}
}
return result;
}
*/
void updateCurrentStates(){
for (int i = 0; i < 2; i++) {
//{{0,1},{0,1}} -->2 rows, 2 columns each
buttonUpState[idex][0] = digitalRead(buttonUpPin[i]); //update first column of each row with current state
buttonDnState[idex][0] = digitalRead(buttonDnPin[i]);
limitUpState[idex][0] = digitalRead(limitUpPin[i]);
limitDnState[idex][0] = digitalRead(limitDnPin[i]);
}
}
void updatePrevStates(){
for (int i = 0; i < 2; i++) {
//{{0,1},{0,1}} -->2 rows, 2 columns each
buttonUpState[idex][1] = buttonUpState[idex][0]; =//update 2nd column of each row with current state
buttonDnState[idex][1] = buttonDnState[idex][0];
limitUpState[idex][1] = limitUpState[idex][0];
limitDnState[idex][1] = limitDnState[idex][0];
}
}
void loop()
{
updateCurrentStates(); //update states of all buttons and limits
for (int i = 0; i < 2; i++) {
if(limitUpState[idex][0] != limitUpState[idex][1]){
if(limitUpState[idex][0]==HIGH){//this limit-UP was TRIGGERED
ST.motor(i,0);
motorState[i][0] = 0;
}
}
if(limitDnState[idex][0] != limitDnState[idex][1]){
if(limitDnState[idex][0]==HIGH){//this limit-UP was TRIGGERED
ST.motor(i,0);
motorState[i][0] = 0;
}
}
if(buttonUpState[idex][0] != buttonUpState[idex][1]){
if(buttonUpState[idex][0]==LOW){//this button-UP went from OFF to ON
if(safeToMove(i,127)){
ST.motor(i,127);
motorState[i][0] = 1;
}
}
else{//this button-UP went from ON to OFF
ST.motor(i,0);
motorState[i][0] = 0;
}
}
if(buttonDnState[idex][0] != buttonDnState[idex][1]){
if(buttonDnState[idex][0]==LOW){//this button-DOWN went from OFF to ON
if(safeToMove(i,-127)){
ST.motor(i,-127);
motorState[i][0] = -1;
}
}
else{//this button-DOWN went from ON to OFF
ST.motor(i,0);
motorState[i][0] = 0;
}
}
}
updatePrevStates();
}