Libraries not Getting included

#include <ESP8266WiFi.h>

#include <LiquidCrystal.h>

const int rs = 0, en = 1, d4 = 4, d5 = 5, d6 = 6, d7 = 7;

LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

const char *ssid =  "000";     // Enter your WiFi Name

const char *pass =  "***"; // Enter your WiFi Password

WiFiServer server(80);

void setup() {

  //setup code here, to run once:


  lcd.begin(16, 2);


  Serial.println("Connecting to ");

  lcd.print("Connecting.... ");


  WiFi.begin(ssid, pass);

  while (WiFi.status() != WL_CONNECTED)







  Serial.println("WiFi connected");

  Serial.print("IP Address: ");




void loop() {



  lcd.setCursor(0, 0);


  air_quality = ((analogRead(A0)/1024.0)*100.0);




// put your main code here, to run repeatedly:

  WiFiClient client = server.available();

  if ( client.connected()) { // loop while the client's connected

// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)

  client.println("HTTP/1.1 200 OK");


  client.println("Connection: close");

  client.println("Refresh: 3"); // update the page after 4 sec


//truns the GPIOs on and off


  lcd.print("Sending Data" );

//Display the HTML web page

  client.println("<!DOCTYPE html><html>");

  client.println("<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");

  client.println("<link rel=\"icon\" href=\"data:,\">");

// Web Page Heading

  client.println("<body><h1 style=\"color:orange;\"> Air Quality Measurement </h1>");

  client.println("<body><p style=\"color:blue;\"> Pollution Content(in percentage) = " + String(air_quality) +" %"+ " </p>");

  if(air_quality <= 20.0 ){

  client.println("<body><p style=\"color:green;\"> Normal </p>");

  } else if (air_quality > 20.0 && air_quality < 70.0){

  client.println("<body><p style=\"color:purple;\"> Medium </p>");

  } else {

  client.println("<body><p style=\"font-size:200%; color:red\"> Danger!!! </p>");





lcd.setCursor(0, 0);





}`Preformatted text`

Read the forum guidelines to see how to properly post code and useful hints on how to get the best from the forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

If there are errors, please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

1 Like

How does the OP know that libraries are not getting included? Is there an error message that the OP failed to supply with their original posting?

code tags?

This is the error message:

sketch_oct19a:2:10: fatal error: ESP8266WiFi.h: No such file or directory
#include <ESP8266WiFi.h>
compilation terminated.
exit status 1
ESP8266WiFi.h: No such file or directory

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences

did you install the board-definition for the ESP8266?
after that
did you adjust the board-manager to a ESP8266 board?

best regards Stefan

1 Like

See post#5.

1 Like

yes I did Sir

Hi @ibtizam. I'm going to ask you to post some additional information that might help us to identify the problem.

Please do this:

  1. When you encounter an error, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button.
  2. Open a forum reply here by clicking the Reply button.
  3. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  4. Press Ctrl+V. This will paste the compilation output into the code block.
  5. Move the cursor outside of the code block markup before you add any additional text to your reply.
  6. Click the Reply button to post the output.

is not clearly relatable to one of the questions. Anyway:
You are welcome on this forum! You are working on an informatic project and what is most needed in an informatic project is information imagine: do the other users here in the forum have a clear picture of what you are trying to do?

To speed up finishing your project you should invest some time into writing additional information I'm 100% sure that this WILL speed up finishing your project.

So please go through this checklist and if you find an item you haven't posted yet post it

  • did you write which exact type of microcontroller you are using?
  • description of your programming skills and knowledge
  • description of your knowledge about electronics
  • description of the functionality you want to have written in normal works avoiding programming terms
  • do you have an oscilloscope? Yes / No
  • do you have a digital multimeter (DMM) Yes / No)
  • your age
  • did you post your complete sketch?
  • if relevant did you post a link to a datasheet of each component you are using?
  • if relevant did you post a handdrawn schematic or your wiring?
  • if you got a compiler-error. Did you post the complete compiler-output into a code-section?

If you don't post all this information because you want a "quick answer" to your detail problem It is very likely to turn out that all that happens is having mutliple waiting-times with mutliple asking back for details until the other users do have a clear picture of what you want to do.

best regards Stefan