 
 boolean DEBUG = false;                      // send stuff to serial monitor for testing
 
+const byte slaveAdr = 0x002;                // I2c "Wire" address for slave mcu 
 const byte ledPin = 13;                     // on board LED
-const byte holdPinArm = 12;                 // enable pins for stepper drivers
+const byte holdPinArm = 12;                 // enable pins for stepper drivers: arm, lift
 const byte holdPinLift = 11;                // HIGH->disable, LOW->enables
 const byte SERV1PIN = 10;                   // servo control pin
-const byte PINST1_ST = 6;          
+const byte PINST1_ST = 6;                   // step & direction pins going to driver boards
 const byte PINST1_DIR = 7;
 const byte PINST2_ST = 4;
 const byte PINST2_DIR = 5;

// interrupt function on pin 3, int.1
void limitArm() {
  armState = digitalState(LIMIT_ARM);
}



    // first character sent switches us into LOADED mode
    // 97="a", 98="b", 99="c", 100="d", 120="x"
    if (Serial.available() > 0) {        
      commandChar, destInt = parseSerial();
      if (!LOADED) {
        LOADED = true;
        stepperLift.setCurrentPosition(0);
        UPDATE = true;
      }        
      Serial.println("Rx: " + inputString);
      if (commandChar == "a") {              // 'a' hover over input stack
        stepperArm.moveTo(hoverArmPos);
        stepperLift.moveTo(stepperLift.currentPosition() - 20);          
      }
      else if (commandChar == "b") {        // 'b' ID'd pile
        stepperArm.moveTo(firstArmPos);
        destinationArmPos = firstArmPos;
      }
      else if (commandChar == "c") {        // 'c' unidentified pile
        stepperArm.moveTo(secondArmPos);
        destinationArmPos = secondArmPos;
      }
      else if (commandChar == "d") {       // 'd' Reset into loading mode until another character sent
        stepperArm.moveTo(firstArmPos);
        destinationArmPos = firstArmPos;
        LOADED = false;
      }
      else if (commandChar == "x") {
        cmdGood, movingToPos = sendtoSlave(destInt);
        Serial.println("slave Mcu sent: " + String(destInt));
      }
      inputString = "";
    }    
