Will there ever be a non-integer number of steps per revolution, like 30.073?
When you calculate this:
const float STEPS_PER_OUT_REV = STEPS_PER_REVOLUTION * GEAR_REDUCTION;
You might not end up with the number you expect due to floating point truncation. When I was in school, some people answered exam questions with answers like, "2.9999999" because the calculators the school lent out, didn't round numbers. All those people got half marks.
Also, 5 milliseconds is very near the borderline for some switch bounce, it's really too short for some.
You never need to check a value you've already checked. So this:
if(isOpen == LOW)
{
delay(1000);
}else if(isOpen == HIGH)
{
delay(5);
}
would be better expressed:
if(isOpen == LOW)
{
delay(1000);
}
else
{
delay(5);
}