Temprature control program ..!!need help..

Can any One Help me to write programming for this Condition:

if temperature reaches 80 degrees, turn device on until temperature reaches 70 degrees. Then don't turn back on until temperature reaches 80 degrees again.

Can any One Help me to write programming for this Condition:

When is our homework do? What have YOU tried?

What you want to do is trivial. Show us what code you have come up. Explain what it actually does, and how that differs from what you want.

And do NOT open any more threads on this same topic!

Hi,
Can you tell us your electronics, programming, arduino, hardware experience?

Is this a school/college/university project?

We can help you,but you need to show you have some knowledge of C++, and attempted to code.
What class is this for and what had they taught you?

Tom... :slight_smile:

HI Tom and paul, :o

I am Not export in C++As I am just beginner.

I am Making This Project For My Small GreenHouse Project at Home.That why I am asking For Help.I don't want whole Program all i need Is Just Hint.what should I need To do to resolve this query and what Combination OF Loop will Help Me to Achieve Desire result.?

Please read below Program with Simple If/else Loop.
#define DHT11_PIN A1
int fan = 13;

void setup(){
Serial.begin(9600);
pinMode(fan,OUTPUT);

void loop()
{
int chk = DHT.read11(DHT11_PIN);
Serial.print("Temperature = ");
Serial.println(DHT.temperature);
Serial.print("Humidity = ");
Serial.println(DHT.humidity);

if (DHT.temperature>30)
{
digitalWrite(fan,HIGH);
}
else
{
digitalWrite(fan,LOW);
}
}

But i want to keep My Greenhouse temperature Between 25-35.

when i am running this program it simply turn on ON my Fan once Temperature reach 30.

and Turn Off Fan when temperature reach 29.

Please Help to resolve This. :o

   // If the temperature is above 30, turn on the fan
   if(DHT.temperature > 30)
   {
      digitalWrite(fan, HIGH);
   }

   // If the temperature is below 25, turn off the fan
   if(DHT.temperature < 25)
   {
      digitalWrite(fan, LOW);
   }

Notice how consistent indenting and spaces makes the code more readable, and comments help explain why the code is doing what it does

STOP POSTING THE SAME DAMNED QUESTION