 /*                LOOP                 /
 /**************************************/
 void loop(){
-	delay(3);
 if  (allStopVar == 0){
     calculateRPM();
     discSlipCheck();
-    lockedRotorCheck();
+   // lockedRotorCheck();
 }
-    now = millis();
+    //now = millis();
     //MQTT Connection Check
-	//if (!client.connected()) {
-	//	reconnect();
-    //}
+    //if (!client.connected()) {
+    //reconnect();
+   // }
     //client.loop();
 }
 

}    

void discSlipCheck(){
    if (rpm < (DESIREDRPM_TABLE - ROTATIONVARIANCE && allStopVar == 0)){
        discSlipPrecond++;
		Serial.println("Disc is slipping from nominal RPM");
		Serial.println(discSlipPrecond);
        }
    else
        if (rpm >= (DESIREDRPM_TABLE - ROTATIONVARIANCE && allStopVar == 0)){
        discSlipPrecond--;
        }
    if (discSlipPrecond > DISCSLIPCOUNT){

void lockedRotorCheck(){
    if (rpm <= LOCKEDDISCRPM){
        digitalWrite(STARTRELAYPIN, LOW); // immediately shut down if RPM lowByte
        }                            
        client.publish(TOPIC_T, "CritErr: Disc rotation is locked, attempting restart");              
}

void allStop(){
    digitalWrite(STARTRELAYPIN, LOW);
    Serial.println("System in All-Stop");
    delay(5000);
    client.publish(TOPIC_T, "CritErr: System halted. All stop active. Restart Required");
    allStopVar = 1;
    loop();
    }    
void exhibitStatusMsg(){
    char gs_msg [50];
