 int newAnalog2 = 0;                         // hold value from the CARD_PIN sensor
 int oldAnalog1 = 0;                         // discover changes in the PROX_PIN sensor
 int oldAnalog2 = 0;                         // discover changes in the CARD_PIN sensor
-long int destinationArmPos = firstArmPos;   // arm drop-off point (first or second)
+long destinationArmPos = firstArmPos;   // arm drop-off point (first or second)
 byte grabTryCount = 0;                      // bump the bin to help the grabber
 byte oldServoPos = servoPosition;           // for tracking changes is servo. Are they continuous?
-String inputString = "";
+String inputString = "";                    // serial communication string
 boolean LOADED = false;
 boolean BACKINGOFF = false;
-byte restServoPos = servoPosition;      // used for moving servo back off its maximum travel on either end;
-                                        //set in fanDown()
-boolean stressedServo = false;          // flag for above
-unsigned long timeStart = 0;
+byte restServoPos = servoPosition;          // used for moving servo back off its maximum travel on either end;
+                                            //set in fanDown()
+boolean stressedServo = false;              // flag for above
+unsigned long timeStart = 0;                
 unsigned long timeCurrent = 0;
-boolean UPDATE = true;                  // flag for printing updated info to serial monitor
-unsigned long currentTime = millis();   // I can't seem to declare local variables
-byte currentServoPos = 0;              
-
+boolean UPDATE = true;                      // flag for printing updated info to serial monitor
+unsigned long currentTime = millis();       // I can't seem to declare local variables
+byte currentServoPos = 0;                   
+String commandChar = "";                      // single letter command parsed from Serial input
+long destInt = 0;                       // serial connection sends stepper position for slider carriage as long - this is sent via I2C to slave mcu
+boolean cmdGood = false;                    // most recent I2C command will be executed?
+long movingToPos = 0;                   // report via I2C of where the slave is moving
 AccelStepper stepperArm(AccelStepper::DRIVER, PINST1_ST, PINST1_DIR);
 AccelStepper stepperLift(AccelStepper::DRIVER, PINST2_ST, PINST2_DIR);
 
 const long int liftUpToTop = -200000;     // arbitrary rise until limit switch hit.
-long int liftBackOff = 500;              // steps to back off the switch; zero is limit-switch position
+long liftBackOff = 500;               // steps to back off the switch; zero is limit-switch position
 
 Servo myserv;
 

#include <AccelStepper.h>
#include <Servo.h>

// #defines are macros for faster pin access than built-in digitalWrite().
//  *http://masteringarduino.blogspot.com/2013/10/fastest-and-smallest-digitalread-and.html

    pinAsInput(PROX_PIN);
    
    attachInterrupt(0, limitLift, CHANGE);          // int.0 on pin 2
    attachInterrupt(1, limitArm, CHANGE);           // int.1 on pin 3
    
    digitalLow(holdPinArm);                 // HIGH disables driver, LOW enables
    digitalLow(holdPinLift);                // HIGH disables driver, LOW enables
