fatal error ESP8266WiFi.h: No such file or directory I want to turn my ESP8266 into an access point so that I can connect directly to it.
I use the following sketch, but when I select
GENERIC module ESP8266 from menu, the libraries ESP8266WiFi.h and ESP8266WebServer.h become available but I was unable to upload the sketch.
Also when I select board as Arduino Uno (Which i have really) and then what to upload then the above two files becomes unavailable and says fatal error no such file... no idea what to do next.
#include &lt;ESP8266wifi.h&gt;
#include &lt;WiFiClient.h&gt;
#include &lt;ESP8266WebServer.h&gt;
#include&lt;WiFi.h&gt;
#include&lt;SoftwareSerial.h&gt;
SoftwareSerial esp(2,3);
IPAddress local_IP(192,168,4,22);
IPAddress gateway(192,168,4,9);
IPAddress subnet(255,255,255,0);
 String ssid=&quot;Wisal&quot;;
 String pass=&quot;12345678&quot;;
 ESP8266WebServer server(80);
 boolean isAccessPointCreated=false;
void setup(){
  esp.begin(115200);
  Serial.begin(115200);
  
  WiFi.mode(WIFI_AP);
  Serial.print(&quot;Setting soft-AP configuration ... &quot;);
  Serial.println(WiFi.softAPConfig(local_IP, gateway, subnet) ? &quot;Ready&quot; : &quot;Failed!&quot;);

  Serial.print(&quot;Setting soft-AP ... &quot;);
  Serial.println(WiFi.softAP(&quot;ESPsoftAP_01&quot;) ? &quot;Ready&quot; : &quot;Failed!&quot;);
  Serial.print(&quot;Soft-AP IP address = &quot;);
  Serial.println(WiFi.softAPIP());
  
}

void loop(){
  while(esp.available()&gt;0){
    char a = esp.read();
      if(a == '\0')
        continue;
      if(a != '\r' &amp;&amp; a != '\n' &amp;&amp; (a &lt; 32))
        continue;
      Serial.print(a);
   }
}
The ESP8266 core for Arduino that you're trying to use is for programming ESP8266 directly. You are trying to program an Uno with an ESP8266 connected to it for use as a WiFi module. For that application the ESP8266 core is of no use. For your application it's most common to run the AT firmware on the ESP8266 and communicate via serial. If you're doing that I recommend the WiFiEsp library:

https://github.com/bportaluri/WiFiEsp

Since you're uploading to the Uno you should have Arduino/Genuino Uno selected in the Tools > Board menu.