 const byte ONRESERVE = 32;          // max byte length of serial-delivered string
 const byte PROX_PIN = A0;           // Analog prox. sensor Pin for card-stack-top
 const byte CARD_PIN = A1;           // Analog prox. for 'card on-board'
-const int cardThickness = 141;       // 141 steps to lift a card. 608steps/turn
-                                    // (20 turns per 86 cards, 141.3953 ...
-const int proxSense2 = 800;         // threshold for OPB606A riding on fan housing
-const int liftSenseTop = 500;        // above threshold nothing is close to face of OPB606A
+const int cardThickness = 52;       // calculated 141 steps to lift a card. 608steps/turn
+                                     // (20 turns per 86 cards, 141.3953 ...
+const int proxSense2 = 600;         // threshold for OPB606A riding on fan housing
+const int liftSenseTop = 810;        // above threshold nothing is close to face of OPB606A
 const long int hoverArmPos = 5;      // pick up postion after zeroing against armLimit
 const long int firstArmPos = 142;    // experimentally determined drop-off position
 const long int secondArmPos = 280;   // 2nd drop and max Arm travel
-const byte lowAng = 147;              // servo position: closest approach to card-stack
-const byte midAng = 117;              // servo position: move to clear roller
-const byte highAng = 15;              // servo postion:
-const byte bumpBinSteps = 36;        // for jiggle when grabTryCount goes up.
-const byte servoPosition = 50;      // initial safe servo position
+const byte lowAng = 120;              // servo position: closest approach to card-stack
+const byte highAng = 157;              // servo postion:
+const byte bumpBinSteps = 36;        // for jiggle when grabTryCo17unt goes up.
+const byte servoPosition = 145;      // initial setup() safe servo position
+const byte extraServoBump = 3;      // travel either way a little further then settle back to low or high
 int newAnalog1 = 0;                 // hold value from the PROX_PIN sensor 
 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
-byte grabTryCount = 0;              // bump the bin to help the grabber             
+long int 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 = "";
 boolean LOADED = false;
 boolean ARMZEROED = 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;
 unsigned long timeCurrent = 0;
+boolean UPDATE = true;              // flag for printing updated info to serial monitor
 
 AccelStepper stepperArm(AccelStepper::DRIVER, PINST1_ST, PINST1_DIR);
 AccelStepper stepperLift(AccelStepper::DRIVER, PINST2_ST, PINST2_DIR);

    Serial.println("A0: " + String(analogRead(PROX_PIN)));
    Serial.println("A1: " + String(analogRead(CARD_PIN)));
    stepperLift.moveTo(liftUpToTop);
    stepperArm.moveTo(-1023);
    timeStart = millis();
    timeCurrent = millis();
}

}

// trying for non-blocking servo with delay between actuation attempts...
void fanDown(byte down, byte drop, long int dropZone) {
  // go down to get card only if stopped in hover position over bin
  
  if (!stressedServo && ((millis() - timeStart) > 700)){ 
    if ((stepperArm.currentPosition() == hoverArmPos) && (newAnalog2 > proxSense2)) {
      myserv.write(down - extraServoBump);
      restServoPos = down;
      stressedServo = true;
      timeStart = millis();
      grabTryCount += 1;
    }
    else if ((stepperArm.currentPosition() == dropZone) && (newAnalog2 < proxSense2)) {
      myserv.write(drop + extraServoBump);
      restServoPos = drop;
      stressedServo = true;
      timeStart = millis();
      grabTryCount = 0;
    }
  }
  else if (stressedServo && ((millis() - timeStart) > 600)) {
    myserv.write(restServoPos);
    stressedServo = false;
  }
}

