# "liquid crystal does not name a type" please help me to solve

**URL:** <https://forum.arduino.cc/t/liquid-crystal-does-not-name-a-type-please-help-me-to-solve/493284>\
**Category:** Programming\
**Created:** [November 25, 2017, 12:49pm UTC](https://forum.arduino.cc/t/liquid-crystal-does-not-name-a-type-please-help-me-to-solve/493284 "2017-11-25T12:49:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NineNinjas911](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@NineNinjas911](https://forum.arduino.cc/u/NineNinjas911)\
**Post date:** [November 25, 2017, 12:49pm UTC](https://forum.arduino.cc/t/liquid-crystal-does-not-name-a-type-please-help-me-to-solve/493284/1 "2017-11-25T12:49:06Z")

</div>

it keeps saying things like

```cpp
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

```cpp
  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

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [November 25, 2017, 12:53pm UTC](https://forum.arduino.cc/t/liquid-crystal-does-not-name-a-type-please-help-me-to-solve/493284/2 "2017-11-25T12:53:59Z")

</div>

```cpp
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#include <LiquidCrystal.h>

#include <LiquidCrystal.h>

```

Shouln't you include the lcd library **before** you call the lcd constructor? You only need to include it once.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 10:51pm UTC](https://forum.arduino.cc/t/liquid-crystal-does-not-name-a-type-please-help-me-to-solve/493284/3 "2021-05-05T22:51:32Z")

</div>

Closed on May 5, 2021, 10:51pm UTC


