 			updateSR();
 		}
 }
+void securityBlink(int i) {
+	//This functions blinks the hotend LEDs to know that it is cold enough to hold it
+	if (i < 4){
+		bitSet(leds1,i*2);
+		updateSR();
+		} else {
+		bitSet(leds2,i*2-4);
+		updateSR();
+	}
+	delay(100);
+	if (i < 4){
+		bitClear(leds1,i*2);
+		updateSR();
+		} else {
+		bitClear(leds2,i*2 -4);
+		updateSR();
+	}
+}
 void setPIDtunings(double Kp, double Ki, double Kd) {
 	kp = Kp;
 	ki = Ki;

						//Do nothing
					break;
				}
			}
			hotends[i].update(output);
			if (hotends[i].state == 1)					//Heating done. Temperature Reached
			{
				manageLEDs(hotends[i].hotendState, i);
			} else if (hotends[i].state == 0) {			//Temperature not reached. Blinking...
				if (hotends[i].gap < 2.0 || hotends[i].tempCelsius < MAXTEMPERATURE && connectedHotends[i] == 1)
				{	
					blinkLeds(i);
				}
			}
		} //for end
		printTemperatures();

#include "PID_v1.h"
//--------------------CONSTANTS-----------------------------------------
#define MAXTEMPERATURE 250
#define SECURITYTEMPERATURE 50
#define UPDATEINTERVAL 500 //compute everything every half second

const char* tempSensors[]= {"THERM0","THERM1","THERM2","THERM3","THERM4","THERM5"};
