it keeps saying things like
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
sketch_for_dht11_heat_sensor:7: error: 'LiquidCrystal' does not name a type
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
^
C:\Users\shiva\Desktop\innpvation week\sketch_for_dht11_heat_sensor\sketch_for_dht11_heat_sensor.ino: In function 'void loop()':
sketch_for_dht11_heat_sensor:46: error: 'lcd' was not declared in this scope
lcd.print("CO value: ");
^
exit status 1
'LiquidCrystal' does not name a type
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
here is my code
const int AOUTpin=0;//the AOUT pin of the CO sensor goes into analog pin A0 of the arduino
const int DOUTpin=8;//the DOUT pin of the CO sensor goes into digital pin D7 of the arduino
const int ledPin=13;//the anode of the LED connects to digital pin D13 of the arduino
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#include <LiquidCrystal.h>
#include <LiquidCrystal.h>
int limit;
int value;
#include "DHT.h"
float h, t;
DHT DHT_sens(8, DHT11); //datapin sensor to pin 8 Arduino
void setup()
{
Serial.begin(115200);//sets the baud rate
pinMode(DOUTpin, INPUT);//sets the pin as an input to the arduino
pinMode(ledPin, OUTPUT);//sets the pin as an output of the arduino
DHT_sens.begin();
Serial.begin (9600);
Serial.println ("===============================================");
Serial.println (" HUMIDITY, TEMPARATURE AND CO LEVEL MONITOR");
Serial.println ("===============================================");
Serial.println (" ");
}
void loop(){
value= analogRead(AOUTpin);//reads the analaog value from the CO sensor's AOUT pin
limit= digitalRead(DOUTpin);//reads the digital value from the CO sensor's DOUT pin
Serial.print("CO value: ");
Serial.println(value);//prints the CO value
Serial.print("Limit: ");
Serial.println(limit);//prints the limit reached as either LOW or HIGH (above or underneath
Serial.println("=============================");
lcd.print("CO value: ");
lcd.println(value);//prints the CO value
lcd.print("Limit: ");
lcd.println(limit);//prints the limit reached as either LOW or HIGH (above or underneath
lcd.println("=============================");
if (value > 750) digitalWrite(ledPin, HIGH);
if (value < 750) digitalWrite(ledPin, LOW);
// ================== read from buffer and display =========================
h = DHT_sens.readHumidity();
t = DHT_sens.readTemperature();
delay (1000); // pause a second
Serial.print ("Humidity: ");
Serial.print (h,0); // zero decimal
Serial.print (" %\t");
Serial.print ("Temperature: ");
Serial.print (t,1); // one decimal
Serial.println (" *C");
lcd.print ("Humidity: ");
lcd.print (h,0); // zero decimal
lcd.print (" %\t");
lcd.print ("Temperature: ");
lcd.print (t,1); // one decimal
lcd.println (" *C");
delay (1000); // pause a second
}
plese help thanks