Room Temperature Monitoring

SRJT08301

Jugaadu's mother got a very high fever. Jugaadu visits with his mother to the doctor. Doctor asks him to remain assured, and just maintain optimum room temperature so that his mother'conditions don't get worse. Now Jugaadu has the task at his hand to develop something which helps in maintaining the optimal room temperature?

Bag Items:

  1. Arduino UNO UNO
  2. Jumper Wires
  3. USB Cable
  4. Foam sheet
  5. Battery and DC Jack
  6. Glue gun
  7. Humidity sensor
  8. Different colour LEDs
  9. Cutter
  10. Breadboard

    #include  
dht DHT; 
int dhtPin = 8; //Data pin of DHT-11 to Arduino digital pin 8 

int chk; 
float hum; //Stores humidity value 
float temp; //Stores temperature value 
int red=9; 
int yellow=10; 
int blue=11; 

void setup() 
{ 
Serial.begin(9600); 
pinMode(9,OUTPUT); 
pinMode(10,OUTPUT); 
pinMode(11,OUTPUT); 
} 

void loop() 
{ 
DHT.read11(dhtPin); //Check data pin and read values 
//Read data and store it to variables hum and temp 
hum = DHT.humidity; 
temp= DHT.temperature; 
//Print temp and humidity values to serial monitor 
if(temp<=30) 
{digitalWrite(9,LOW); 
digitalWrite(10,LOW); 
digitalWrite(11,HIGH); 

} 
else if(temp>30 && temp<40) 
{digitalWrite(9,LOW); 
digitalWrite(10,HIGH); 
digitalWrite(11,LOW); 

} 
else if(temp>40 && temp<60) 
{digitalWrite(9,HIGH); 
digitalWrite(10,LOW); 
digitalWrite(11,LOW); 
} 
Serial.print("Humidity: "); 
Serial.print(hum); 
Serial.print(" %, Temp: "); 
Serial.print(temp); 
Serial.println(" Celsius"); 

delay(2000); //Delay 2 sec. 
}