  */
 
 #include <SoftwareSerial.h>
+#include <EEPROM.h>
 
 //General-use global variables
 enum mode {sensor, alarm};
 unsigned long time = millis();
+const unsigned int eepromModeAddress = 0;
 mode opMode = sensor;
 bool reconfiguration();
 

  digitalWrite(sensorPin, HIGH); //Sets the pullup resistor

  //Speaker is already set up by default as output

  //Setup Bluetooth/serial
  //Even though they might not be used (based on mode), activate them anyways so that the

    else if (input == '0' && counter == 1) {
      opMode = sensor;
      blinkRate = sensorBlinkRate;
      EEPROM.write(eepromModeAddress, 0);
      retVal = true;
      Serial.println("Now a sensor. Reconfiguration successful.");
    }
    else if (input == '1' && counter == 1) {
      opMode = alarm;
      blinkRate = alarmBlinkRate;
      EEPROM.write(eepromModeAddress, 1);
      retVal = true;
      Serial.println("Now an alarm. Reconfiguration successful.");
    }
    else if (input == '2' && counter == 1) {
      
