temperature sensor program

My project is temperature sensor. My items is dc fan, 9v battery, 2N2222a’s transistor and arduino uno and lcd and 10kohm,1kohm register and temperature sensor DHT22. yesterday i did completed to make a circuit. But it didn’t program operation. I don’t know program’s matter or error. Please help me. Next this is temperature sensor’s program.

#include<dht.h>
#include<LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
#define dht_dpin 12
dht DHT;
#define pwm 9
byte degree[8] =
{
0b00011,
0b00011,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};
void setup()
{
lcd.begin(16, 2);
lcd.createChar(1, degree);
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.read22(dht_dpin);
int temp=DHT.temperature;
lcd.setCursor(0,0);
lcd.print(“Temperature:”);
lcd.print(temp);
lcd.write(1);
lcd.print(“C”);
lcd.setCursor(0,1);
if(temp =<30)
{
analogWrite(9,0);
lcd.print("Fan OFF ");
delay(100);
}
else if(temp>=50)
{
analogWrite(pwm, 255);
lcd.print("Fan ON ");
delay(100);
}
delay(3000);
}

Please teaching me

What problems are you having? You didn’t really explain your issues.

Please read the two posts at the top of the forum about how to use this forum. Please use code tags when posting code.

if(temp =<30)

That should be <=

seokwon:
9v battery,

Quite likely that. If it's a PP3 battery, it's very likely

 if(temp =<30)

The operator is <=.