some problem in my code that i cant figure out

Malti:
so what should i do i want to make a pot meter controlled temp threshold changing circuit where relay would be used . i need two conditions as i uses if and while .pls help.

work is this to use........

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please explain what you are trying to do with your code, what is it for?
You have a pot and a temperature sensor, please list all the cases you want to program into your code and the output responses.

This sounds like a switch.. case type solution.

Tom.... :slight_smile:

while(condition) {
  // At this point condition is true
   while(condition) {
      statement(s);
   }
   //If we are here, condition is false
	
   statement(s);
}

so instead of using while loops i tried with if nested loops and the code was working fine ......
thanks to all those who replied and sorry for replying late.