So lets start again, i am a little confused right now.
this is the working code so far. in this code i need to add this protection.
const int Bias_Switch = A5; // the number of the Bias switch analog input pin A5.
const int Bias_Relais = 2; // the number of the Bias_Relais digital output pin 2.
boolean mySet = false;
boolean Bias;
void setup() {
pinMode(Bias_Switch, INPUT); // sets analog pin 5 for input.
digitalWrite(Bias_Switch, LOW); // turn on pullup resistors
pinMode(Bias_Relais, OUTPUT); // set the digital pin as output.
}
void loop() {
Bias = digitalRead(Bias_Switch); // read the value DUMMY.
Bias = digitalRead(Bias_Switch); // read the value from the Bias_Switch.
if (Bias==HIGH) mySet = true; // set bolean to true
else
mySet=false;
digitalWrite(Bias_Relais, mySet);
}
i have test this sketch and it work!.
Now we need to add the to high temperature protection.
status normal operational:
Bias = HIGH
Bias_Relais = HIGH
My temperture sensor named in the code: tempC
status when there is a "to heat" problem.
tempC>100
Bias = HIGH
Bias_Relais = must be switched automatic to LOW and stay LOW. When the problem on site is fixed, I have to reset manual the BIAS switch to LOW and switsch on back to HIGH.
hope i have explain it a little better now.