[SOLVED] Error on ESP8266 Example Doc

Hi there

I’m trying to follow your doc Connect the ESP8266 as a telemetry unit with Ubidots | Ubidots Help Center but I’m getting some library errors as follow.

Today I’m using the module sending AT commands via software serial.

As soon I import the UbidotsESP8266 lib I get the following error:

/Arduino/libraries/ubidots-esp8266-serial-master/src/UbidotsESP8266.h:33:25: fatal error: ESP8266WiFi.h: No such file or directory

Which leads me to search around the error and I found two different libs:

This:
https://github.com/ekstrand/ESP8266wifi
Doesn’t work.

And this:
https://github.com/esp8266/Arduino
Which is not a lib but a core ide to use straight with ESP’s. Not my case.
However, inside the directory Libraries I could find the lib ESP8266WiFi
I did import it and doesn’t work with the error:

/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiType.h:26:19: fatal error: queue.h: No such file or directory

Ok, so to avoid import every each file I can find on internet I would like some help.

How can I setup my environment to use ESP with Ubidots Library ?

Thanks

Dear @gloffreda,

As I can see you are following an outdated documentation. You will find all the documentation updated in the Ubidots Help Center.

Days ago we made some improvements in the Ubidots ESP8266 library, so you should wait a few days in order to use the new version of the library and avoid any issue. If you desire, I can let you know when the library is available for the users.

All the best,
Maria C.

Dear @mariahernandez

Thank you for your reply.
Can you point me the document describing the same use case as the outdated document ?
I could find the logger, telemetry etc. But what I’m looking for is just to use my Nano with ESP8266 through Software Serial to pump data to Ubidots.

Thanks
Giulio

The Software Serial version is deprecated. The new version is the one that I mentioned above, ubidots-esp8266s-serial.

The only limitation of using the examples provided in the library is that you will be not able to make debug because the arduino Nano just have one serial port, but it should work without any problem. Remember modify the code to send the data through the right serial port.

I hope this would help you to start with your IoT project!

All the best,
Maria C.

Dear

Thank you again.
That’s weird to deprecate a function like that. I would improve instead as many boards are not heavy enough to have more than one hw serial.
Anyway, I can change the lib to get it, not big deal. I hope.

I just downloaded the library and opened the telemetry example sketch and got:

In file included from /Arduino/sc001/sc001.ino:1:0:
/Arduino/libraries/ubidots-esp8266-serial-master/src/UbidotsESP8266.h:33:25: fatal error: ESP8266WiFi.h: No such file or directory
 #include <ESP8266WiFi.h>
                         ^
compilation terminated.
exit status 1

Is that “normal” as this is not the final release ?

If I get the library ESP8266WiFi it start over my first post with the error:
/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiType.h:26:19: fatal error: queue.h: No such file or directory

Thank you for your help

As I can see, the issue is produced because it can’t found the ESP8266WiFi library. For this, please verify if the ESP8266 environment is properly installed in your Arduino IDE. Also, you can try the following points:

  1. Go to Tools > Board > Board Manager > ESP8266, then press remove.
  2. Close the Arduino UNO, and re-open it again.
  3. Go to Tools > Board > Board Manager > ESP8266, then press install.
  4. Verify if the ESP8266 library are installed. To do this, go to Sketch > Include Library > Contributed Libraries > ESP8266 xxxx.

If you can see the ESP8266 libraries, you should not get any issue compiling the code into the board.
I hope this would help you.

All the best,
Maria C.

also if you can’t find the ESP8266 in the Board manager. Follow this instructions in https://arduino-esp8266.readthedocs.io/en/latest/installing.html

Can I also Include my Issue here, because i’m not Using ESP8266 board.
I use Arduino Mega Board since that’s the device i need to use and with my Esp8266 ESP-01s.
Same problem Error on ESP8266WiFi.h no such file or directory and i tried to download some github sources. and the only problem left is ESP8266WiFiType.h:26:10: fatal error: queue.h: No such file or directory
#include <queue.h>

      ^~~~~~~~~

compilation terminated.

exit status 1
Error compiling for board Arduino Mega or Mega 2560.

Hello @warshockII,

Refer to this GitHub issue to solve the problem presented.

I hope this helps.

Cheers,
Maria H.