     Serial.println(degC);
   }
   else if (cmd == "VERSION") {
-    Serial.println("TC Laboratory Firmware Version " + vers);
+    Serial.println("TClab Firmware Version " + vers);
   }
   // shutdown
-  else if (cmd == "X") {
-    analogWrite(pinQ1, 0);
-    analogWrite(pinQ2, 0);
+  else if ((cmd == "X") or (cmd.length() > 0)) {
+    Serial.println("Unrecognized command. Please reset.");
+    setHeater1(0);
+    setHeater2(0);
+    brdStatus = 0;
   }
-  // shut down on unrecognized command
-  else if (cmd.length() > 0) {
-    Serial.println("Unrecognized command. Please reset.");
-    analogWrite(pinQ1, 0);
-    analogWrite(pinQ2, 0);
-    while (true) {
-      analogWrite(pinLED1, limLED1);
-      delay(250);
+}
+
+// check alarms and update status on LED1
+void AlarmCheck(void) {
+  if (analogRead(pinT1) > limT1) {
+    alarmStatus = 1;
+  }
+  else if (analogRead(pinT2) > limT2) {
+    alarmStatus = 1;
+  }
+  else {
+    alarmStatus = 0;
+  }
+}
+
+// update LED
+void LEDUpdate(void) {
+  // find led status
+  ledStatus = brdStatus;
+  if ((Q1 > 0) or (Q2 > 0)) {
+    ledStatus = 2;
+  }
+  if (alarmStatus > 0) {
+    ledStatus = 3;
+    if ((Q1 > 0) or (Q2 > 0)) {
+      ledStatus = 4;
+    }
+  }
+  // update led depending on ledStatus
+  if (ledStatus == 0) {
+    analogWrite(pinLED1, 0);
+  }
+  else if (ledStatus == 1) {
+    analogWrite(pinLED1, loLED);
+  }
+  else if (ledStatus == 2) {
+    analogWrite(pinLED1, hiLED);
+  }
+  else if (ledStatus == 3) {
+    if ((millis() % 2000) > 1000) {
+      analogWrite(pinLED1, loLED);
+    } else {
       analogWrite(pinLED1, 0);
-      delay(250);
+    }
+  }
+  else if (ledStatus == 4) {
+    if ((millis() % 2000) > 1000) {
+      analogWrite(pinLED1, hiLED);
+    } else {
+      analogWrite(pinLED1, 0);
     }
   }
 }
 
-
-// check alarms and update status on LED1
-void AlarmsCheck(void) {
-  if ((analogRead(pinT1) > limT1) or (analogRead(pinT2) > limT2)) {
-    analogWrite(pinLED1,limLED1);
-  } else {
-    analogWrite(pinLED1,limLED1/16);
-  }
-}
-
-
-// setup on reboot
+// arduino setup procedure
 void setup() {
   analogReference(EXTERNAL);
   Serial.begin(baud); 

const int pinLED1 = 9;         // LED1

// high limits expressed (units of pin values)
const int limLED1 =  50;       // LED1 limit
const int limQ1   = 150;       // Q1 limit
const int limQ2   = 150;       // Q2 limit
const int limT1   = 310;       // T1 high alarm (approx. 50 deg C)
const int limT2   = 310;       // T2 high alarm (approx. 50 deg C)


// parse serial input
void SerialParse(void) {

  pv = data.toInt();
}

// dispatch commands
void CommandDispatch(void) {
  // process commands
  if (cmd == "Q") {
    setHeater1(pv);
    setHeater2(pv);
  }
  else if (cmd == "Q1") {
    setHeater1(pv);
  }
  else if (cmd == "Q2") {
    setHeater2(pv);
  }
  else if (cmd == "T1") {
    float mV = (float)analogRead(pinT1) * (3300.0/1024.0);
