temperature controlled dc fan using lm35

i have given the circuit below..the programming is causing the problem ."#include<dht.h>" is creating problem..the error shown is the file dows exists what can i do .to solve this problem
#include<dht.h> // Including library for dht//
#include<LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
#define dht_dpin 12
dht DHT;
#define pwm 9

void setup()
{
lcd.begin(16, 2);

lcd.clear();
lcd.print(" Fan Speed ");
lcd.setCursor(0,1);
lcd.print(" Controlling ");
delay(2000);
analogWrite(pwm, 255);
lcd.clear();
lcd.print("Circuit Digest ");
delay(2000);
}
void loop()
{
DHT.read11(dht_dpin);
int temp=DHT.temperature;
lcd.setCursor(0,0);
lcd.print("Temperature:");
lcd.print(temp); // Printing temperature on LCD

lcd.print("oC");
lcd.setCursor(0,1);
if(temp <26 )
{
analogWrite(9,0);
lcd.print("Fan OFF ");
delay(100);
}

else if(temp==26)
{
analogWrite(pwm, 51);
lcd.print("Fan Speed: 20% ");
delay(100);
}

else if(temp==27)
{
analogWrite(pwm, 102);
lcd.print("Fan Speed: 40% ");
delay(100);
}

else if(temp==28)
{
analogWrite(pwm, 153);
lcd.print("Fan Speed: 60% ");
delay(100);
}

else if(temp==29)
{
analogWrite(pwm, 204);
lcd.print("Fan Speed: 80% ");
delay(100);
}
else if(temp>29)
{
analogWrite(pwm, 255);
lcd.print("Fan Speed: 100% ");
delay(100);
}
delay(3000);
}

Start by posting exactly the error that you are getting, not your summary of what you think it is telling you. Have you installed the dht library from the library manager?

When posting code, please include it inside of code tags. See the sticky post "How to use this forum" item #7 at the top of the forum.

Hi,
OPs Circuit.


You will need to connect the neg/gnd of the 9V supply to the UNO gnd.

Tom.... :slight_smile: