For readability I would add
enum ShredState { IDLE, PRIMED, ACTIVE };
ShredState shredCase;
...
switch(shredCase) {
case IDLE: ...
case PRIMED: ...
case ACTIVE: ...
}
See also -
http://www.arduino.cc/playground/Code/Enum
buttonSafetyState = digitalRead(buttonSafetyPin) ;
I would connect the SafetyButton to an interrupt routine so that it allways will be detected. Check - http://arduino.cc/en/Reference/AttachInterrupt
In the interrupt routine you set buttonSafetyState. This could also be an - enum AlarmState{ SAFE, ALARM }
include in setup:
attachInterrupt(0, safetyPressed, LOW );
and add a separate function
void safetyPressed()
{
buttonSafetyState = ALARM;
}
buttonSafetyState must be declares as type AlarmState.
just my 2 cnts