I can't see anything in your ISR that tells the rest of the code to exit early - change this while(var < Steps) statement to test an exit early flag which is set in your interrupt routine
while((var < Steps) && bExitEarly == false)
{
...
}
A little comment on your code -
{if (currentLocation == 1) // 1 = middle; 0 = end
{currentLocation = 0;} // 1 = middle; 0 = end
else
{currentLocation = 1;};}
Your comments are a bit pointless, you should use a few defines instead -
// put these at the top of your sketch
#define LOCATION_END 0
#define LOCATION_MIDDLE 1
// then write code like this
// toggle location - this comment just says what the code does, and does not need to explain magic numbers like 0 and 1
if (currentLocation == LOCATION_MIDDLE)
{
currentLocation = LOCATION_END;
}
else
{
currentLocation = LOCATION_MIDDLE;
}
bExitEarly = true; // tell our drive routine to exit, we need to do something else
Duane B