excellent, it is working as I hoped now thanks for the help. This was the crucial bit I had wrong..
desired = digitalRead(modeButton);
if(desired == HIGH && hallTemp <setPoint - hysteresis)
digitalWrite(coldPin, HIGH); // set the LED on
else if (desired == HIGH && hallTemp >setPoint + hysteresis)
digitalWrite(coldPin, LOW); // set the LED off
else if (desired == LOW && averageTemp <setPoint + hysteresis)
digitalWrite(coldPin, HIGH); // set the LED off
else if (desired == LOW && averageTemp >setPoint + hysteresis)
digitalWrite(coldPin, LOW); // set the LED off
while I very much appreciate all the advice and the time you took to compose a reply, there is no need to be sarcastic. I am aware my code is far from perfect and could be greatly improved which is something I plan to work on - I have little experience with programming.
I'm not sure how I could link these together?
outputValue = sensorValue/4; // easier than map function
outputValue = map(constrain(sensorValue, minLight, maxLight), minLight, maxLight, minBacklight, maxBacklight );
I have looked at arrays before in brief detail but I not sure how this could be changed into one?
float average = 0; //input1
float average1 = 0; //input2
float average2 = 0; //input3
float average3 = 0; //input4
float average4 = 0; //input5
float average5 = 0; //input6
I understand all of your other points and I will go though and amend my code.
Thanks again
-Dan