   //Todo: heartbeat communications
   //Todo: communications on the serial interfaces may have varying length. Account for it
   //DONE Todo: slow down bluetooth send rate. It's too fast and will leave an alarm on forever.
-  
+
   if (opMode == sensor) {
     waterReadings();
   }
-  
+  if (opMode == alarm) {
+    heartbeat();
+  }
+
   if (Serial.available()) { //DO NOT allow mode reconfiguration via bluetooth. Security hazard.
 
     if (opMode == alarm) { //What if the Serial command was triggered to reconfigure? (CHECK WITH EUGEN THAT POWER AND USB COMBINED WON'T FRY THE BOARD!)

  alarmSounding = false;
}

//Base code from http://www.arduino.cc/en/Tutorial/PlayMelody

const int delayTillAlarm = 100;
void waterReadings();

//Heartbeat global variables
const unsigned int heartbeatTimeout = 5000;
int heartbeat(bool sent = false);

void setup() {

  //Setup LED
