Go Down

Topic: ESP8266WiFi.h not found even if present (Read 2786 times) previous topic - next topic



I have an esay sketch to check.

ESP01s attached to an Arduino UNO.

Used example sketch.  BasicOTA

installed ESP8266  and libs are in

BasicOTA/BasicOTA.ino:1:25: fatal error: ESP8266WiFi.h: No such file or directory

how do I have to config the arduino IDE that libraries are picked up !!

Strangewise when compiling for NodeMCU or ESP Generic no compile errors.  but can not upload  to the uno.
but for Arduino UNO it is.

Code: [Select]
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>

void setup() {
  WiFi.begin(ssid, password);
  while (WiFi.waitForConnectResult() != WL_CONNECTED) {
    Serial.println("Connection Failed! Rebooting...");

  // Port defaults to 8266
  // ArduinoOTA.setPort(8266);

  // Hostname defaults to esp8266-[ChipID]
  // ArduinoOTA.setHostname("myesp8266");


The libraries bundled with the ESP8266 core for Arduino are only accessible when you have an ESP8266 board selected from the Tools > Board menu. The Uno is not one of those boards. Even if the library was accessible it would do you no good since that library is written for use when directly programming the ESP8266 and would never work on the Uno.

Please explain exactly what you're trying to accomplish.

Go Up