I knew I would get into trouble.
I am enclosing some code I wrote to read a thermister then map it to a temp range, test it and if it doesn't reach a certain temp them my simple program looped it using goto.
I now want to do the same thing but using WHILE but I can not work out how to make it do a wider loop.
Anyone help me???
// read the analog input into a variable:
int svotempvalue = analogRead(svotemp); //Read the SVO Thermister
svotempvalue = map(svotempvalue, 150, 390, 50, 90);
Serial.print("Oil Temperature ");
if (svotempvalue < svotempthreshold)
goto Not50c; //if SVO temp lower than 50c then loop until hot
as you see I used a goto loop but now I am trying to be converted.
The svotempthreshold at this point is 50
I sorted the code out for reading a level sensor switch OK (the subject that started this thread)