Ubidots Community

ENC28J60 for Ubidots

Hello everybody,

I would like to know if someone has already used and managed to integrate the ENC28J60 module with ubidots and how they did it, when I try to place the library <Ubidots.h> or any other I cannot load the program in my arduino, but when I remove the library the program works normally.

Note: My arduino is a Mega2550.

thank you for your attention.

Greetings @kicetokay I hope you are doing great.

Can you please post here the error that you are encountering so we can search for possible errors?

Meanwhile, I’ll let you with this technical guide that might help you clear things out.

Best regards.

–Juan David

Greetings Juan, the error is attached, I will post the translation together, just below.

error: Error compiling for Arduino Mega or Mega 2560 board (in orange)

Every error is displayed like this:

In file included from C:\Users\ADM2\Desktop\Carlos\Projete-2K23\Source file\Code\VR 3.0\VR_3.0.ino\VR_3.0.ino.ino:9:0:
C:\Users\ADM2\Documents\Arduino\libraries\ubidots-esp8266-master\src/Ubidots.h:27:10: fatal error: ESP8266WiFi.h: No such file or directory
#include <ESP8266WiFi.h>
compilation terminated.

exit status 1

Compilation error: exit status 1

Greetings @kicetokay

It seems to me that you are using the wrong version of the library intended for communication with Ubidots.

since you are planing to use a Ethernet module, you should use the following library. Here you’ll find examples about how to use it.

The error you are facing is that the library is trying to load this header:
#include <ESP8266WiFi.h>
Which our HTTP library uses, so that leads me into thinking that may be you are using the wrong version.

Please let us know if this was helpful for you, or even, if it didn’t solved your problem.

Best regards

–Juan David

Hello Juan, how are you?

So, I tried to use this library as I said, but Ethernet.h is not compatible with the ENC28J60 module, at least from the tests I did, do you have any examples to use?

obs: I use port 53 for CS, in case it makes a difference.

Best regards

–Carlos H.

Greetings @kicetokay,

Sadly I don’t see a workaround for this. Our library is wrapped around Ethernet.h and given the fact that said module is not compatible with Ethernet.h library, this task won’t be so straightforward.

I browsed the internet for alternative libraries for your module, and I found this one, so, if you want to use the Ubidots library, what occurs to me is that you can implement its methods by wrapping them around the library intended for the ENC28J60 module.

Also, using our HTTP library for esp32 (I’d guess that is the first one that you tried) won’t work because it is wrapped around ESP8266WiFi.h, which is not avaiable for the Mega2550.

Best regards

–Juan David

Hello Juan,

I believe that with the module it will not work, so I will buy another module, can you tell me if the W5100 is compatible with the Ethernet.h library?

Hello @kicetokay,

I was just searching for the chips compatible with the Arduino Ethernet.h library, and, according to the official documentation

It seems like the W5100 is compatible with that library.

I hope this was helpful.

Best regards.

–Juan David