Missing ESP8288 lib

Before creating the topic

  1. Search forum for similar topics
  2. Check http://docs.blynk.cc and http://help.blynk.cc/
  3. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.
    "
    ESP8266_Shield:36:25: fatal error: ESP8266_Lib.h: No such file or directory
    compilation terminated.
    exit status 1
    ESP8266_Lib.h: No such file or directory
    "
    i am trying to compile the Blynk example after installing the Blynk lib as explained. keep on getting this message. i looked in the internet and installed the ESP8266_Lib but no help.
    please advise where can i download a lib that works
    thank you

What board type are you choosing when you compile the sketch?

Pete.

i think that it is not a board problem but an installation problem: i installed the library with the manage library tool but once i try to compile a sketch the installed library is not found. If you have any idea how to sort that out please advise. i will try to look for a cure at the Arduino forum. once i sort that issue i will try to work my way with the wifi shield

It rather depends on which board type you’ve selected when you compile the code, but it seems that you don’t want to share that information.

Pete.

sure i do, i use an arduino mega + wifi which is an esp8266. i loaded the board manager fine. i installed the esp library and the blynk library also with the tool. the library installation seemed fine and i could see it on the list. i first opened a sketch from the examples and when i tried to compile i got a notice that the included library can not be found.
in order to check the problem i installed a library that i had previously used and now it is also not found. i think that i have a problem that my arduino ide has a problem finding the installed libraries

In this configuration, the ESP-01 needs to be running the factory “AT” firmware. If you write a sketch to the ESP-01 then it will overwrite the AT firmware and you’ll need to re-load this using a special utility.
Your sketch should be uploaded to the Arduino Mega, so that is the board type you should choose when compiling the code.
The ESP core is not required.

Pete.

at the moment i am trying to use the blynk supplied examples. i did not even got to the upload phase because the example sketch fails to compile.
this is the error i get when i try to compile the ËSP8266_Shield example

compilation terminated.
exit status 1
ESP8266_Lib.h: No such file or directory

And, for the third time of asking, what board type are you choosing when you attempt to compile the code?

Pete.

just so i get it right, the example code should be uploaded to the arduino and not to the ESP? i must have read and watched too many tutorials and got it all mixed up. the arduino board will send the commands to the ESP with no need to load anything to the ESP?

i was choosing ESP8266 Boards (2.7.4) > Generic ESP8266 Module

Pete.

thank you so much, i wonder how did i get it all wrong !
with the arduino mega i know how to work, in the tutorials there was misleading information to load the sketch to the ESP

do you have any idea what should i do with the compilation error i keep on getting?

i keep on getting the error code even when i select the arduino mega board at the board manager tool

Please post your code - correctly formatted with triple backticks.

Pete.

/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest

Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.

Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator:           http://examples.blynk.cc
Blynk community:            http://community.blynk.cc
Follow us:                  http://www.fb.com/blynkapp
                            http://twitter.com/blynk_app

Blynk library is licensed under MIT license
This example code is in public domain.


This example shows how to use ESP8266 Shield (with AT commands)
to connect your project to Blynk.

WARNING!
It’s very tricky to get it working. Please read this article:
http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware

Change WiFi ssid, pass, and Blynk auth token to run :slight_smile:
Feel free to apply it to any other example. It’s simple!
*************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “YourAuthToken”;

// Your WiFi credentials.
// Set password to “” for open networks.
char ssid[] = “YourNetworkName”;
char pass[] = “YourPassword”;

// Hardware Serial on Mega, Leonardo, Micro…
#define EspSerial Serial1

// or Software Serial on Uno, Nano…
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void setup()
{
// Debug console
Serial.begin(9600);

delay(10);

// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);

Blynk.begin(auth, wifi, ssid, pass);
}

void loop()
{
Blynk.run();
}

the compiler fails to find ESP8266_Lib.h though it is well installed and exist

Triple backticks look like this:
```
and they need to be added at the beginning and end of your code so that it displays correctly.
Use the edit button (pencil icon) to add them please.

Pete.