I am trying to build a weather station with arduino and send the data to a site using esp8266 and also display some basic information also on my 16x2 lcd display but Iam getting this unsual error.
THE ERROR MESSAGE IS SHOWN BELOW
Arduino: 1.8.13 Hourly Build 2020/02/19 03:33 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
FINAL:156:3: error: 'lcd' does not name a type
lcd.backlight();
^
FINAL:158:3: error: 'lcd' does not name a type
lcd.createChar (6, W6); // load arrow_d to memory 6
^
FINAL:159:3: error: 'lcd' does not name a type
lcd.createChar (7, W7); // load to memory 7
^
FINAL:160:3: error: 'lcd' does not name a type
lcd.createChar (9, W9); // load to memory 7
^
FINAL:161:3: error: 'lcd' does not name a type
lcd.createChar (10, W10); // load diamond to memory 7
^
FINAL:162:3: error: 'lcd' does not name a type
lcd.createChar (12, Battery); // load diamond to memory 7
^
FINAL:163:3: error: 'lcd' does not name a type
lcd.createChar (13, signaL2); // load diamond to memory 7
^
FINAL:164:3: error: 'lcd' does not name a type
lcd.createChar (14, signaL1); // load diamond to memory 7
^
FINAL:166:3: error: 'lcd' does not name a type
lcd.backlight(); // turn on back light
^
FINAL:167:3: error: 'lcd' does not name a type
lcd.clear();
^
FINAL:170:2: error: 'lcd' does not name a type
lcd.setCursor(0,0); //set cursor to upper left corner
^
FINAL:171:2: error: 'lcd' does not name a type
lcd.print("Welcome");
^
FINAL:172:2: error: 'lcd' does not name a type
lcd.setCursor(9,0); //set cursor to upper left corner
^
FINAL:173:2: error: 'lcd' does not name a type
lcd.print(char(6));
^
FINAL:174:2: error: 'lcd' does not name a type
lcd.print(char(7)); //display a ohm
^
FINAL:176:2: error: 'lcd' does not name a type
lcd.setCursor(15,0); //set cursor to upper left corner
^
FINAL:177:2: error: 'lcd' does not name a type
lcd.print(char(12)); //display a ohm
^
FINAL:179:2: error: 'lcd' does not name a type
lcd.setCursor(14,0); //set cursor to upper left corner
^
FINAL:180:2: error: 'lcd' does not name a type
lcd.print(char(13)); //display a ohm
^
FINAL:181:2: error: 'lcd' does not name a type
lcd.setCursor(13,0); //set cursor to upper left corner
^
FINAL:182:2: error: 'lcd' does not name a type
lcd.print(char(14)); //display a ohm
^
FINAL:188:3: error: 'lcd' does not name a type
lcd.setCursor(6,1); //set cursor to bottom left second line
^
FINAL:189:3: error: 'lcd' does not name a type
lcd.print("To");
^
FINAL:190:3: error: 'lcd' does not name a type
lcd.setCursor(9,1); //set cursor to bottom left second line
^
FINAL:192:3: error: 'lcd' does not name a type
lcd.print(char(9));
^
FINAL:193:3: error: 'lcd' does not name a type
lcd.print(char(10));
^
FINAL:194:3: error: 'lcd' does not name a type
lcd.setCursor(10,1);
^
FINAL:195:3: error: 'lcd' does not name a type
lcd.print("refarm");
^
FINAL:196:8: error: expected constructor, destructor, or type conversion before '(' token
delay(3000);
^
FINAL:197:3: error: 'lcd' does not name a type
lcd.clear();
^
FINAL:198:3: error: expected declaration before '}' token
}
^
Multiple libraries were found for "LCD.h"
Used: C:\Users\USER.000\Documents\Arduino\libraries\NewLiquidCrystal_lib
Not used: C:\Users\USER.000\Documents\Arduino\libraries\NewliquidCrystal
Multiple libraries were found for "ESP8266WebServer.h"
Used: C:\Users\USER.000\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266WebServer
Not used: C:\Users\USER.000\Documents\Arduino\libraries\ESPWebServer-master
exit status 1
'lcd' does not name a type
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.