Help with ENC28J60 and EtherCard Library

I'm trying to expand my project by sending data, which are obtained by analog sensors, to an online server.
I have chosen ENC28J60 module to build up the connectivity but having trouble with finding a proper method to start.
I have already googled for few good hours with EtherCard library but still left with many confusions. :confused: :confused:
I just need to establish a connection to a server (static IP) and send a packet of data (HTTP or any) for each Arduino loop.
Any leads/threads of coding would be greatly helpful. :sweat_smile: :sweat_smile:
Thanks in advance.

There is example WebClient that meet your requirements from EtherCard library:

But if it looks difficult to you, maybe UIPEthernet library will be more easier to use for you.

It is library that have same commands as Ethernet or Ethernet2 library for Wiznet W5100 or W5500 shields and modules. I am using it at JSON client sketch that I made for my project for connection to webserver that is running at other microcontroller.
Syntax is same for Ethernet library too. So, if I am using other Ethernet module, I simply edit library name in include :slight_smile:
Sketch:

martinius96:
There is example WebClient that meet your requirements from EtherCard library:
EtherCard/webClient.ino at master · njh/EtherCard · GitHub

Thanks a lot for the support. Firstly, I'll try out EtherCard library.
Initialization of the ENC28J60 is pretty clear for me now.
Is there any chance which you can point me out to a method which I can use to send data to a remote host?

It is function named ether.browseUrl() that is used in that WebClient example at the end for datas sending.

It's definition is in tcpip.cpp library: EtherCard/tcpip.cpp at master · njh/EtherCard · GitHub

Thanks for the great support! I have just decided to go on with the Ethernet Shield as the libraries are easier to work with. I'll revert back to the forum if I face any difficulty once again.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.