         }
       }
       else if (opMode == sensor) {
-        char input = Serial.read();
-
         if (input == '5') { //order of these conditions is important so compiler checks available first!
           reconfiguration(); //Start reconfiguration code
         }

  if (retVal == false) {
    Serial.println("!Reconfiguration failure.");
  }
  
  //Strip out any remaining stuff in the message
  char clean = ' ';
  while (clean != '|' && Serial.available()) {
    clean = Serial.read();
  }
  
  return retVal;
}

void speaker(const byte melody[], unsigned int arraySize) {
  alarmSounding = true;
  analogWrite(speakerOut, 0); //Ensure speaker starts off
  for (int count = 0; count < (arraySize - 1) / 2; count++) { //Iterates through the notes requested
    statePin = !statePin;

//LED global variables
const int ledPin = 13;
int statePin = LOW;
const int sensorBlinkRate = 1000;
const int alarmBlinkRate = 100;
int blinkRate = sensorBlinkRate;
