Arduino WebServer Library

Hi there!

I am migrating with my WebServer (good-looking page with CSS for my clients to control AC, curtains etc..) project from ESP8266 (NodeMCU) to AVR (Uno) due to compatibility with Ethernet devices (ex. ENC28J60 etc.). Thats because i need to change my project connection from Wi-Fi to LAN.

(after many tries i simply made conclusion, that ESP8266 is almost impossible or very difficult to connect via LAN)

In ESP8266 i used these libs:

#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>

Now, in need to use different libs (created for AVR), for AVR, the same work are doing these libs:

#include <Ethernet.h>
#include <EthernetServer.h>

And here is my problem, in my code i have this functions:

server.on("/", srv_handle_index_html);
server.on("/set", srv_handle_set);
server.onNotFound(srv_handle_not_found);

server.begin();

The compiler gives me this error:

'class EthernetServer' has no member named 'on'

In other example, in function:

void srv_handle_index_html() {
  server.send_P(200,"text/html", index_html);
}

Another error:

'class EthernetServer' has no member named 'send_P'

The functions 'on' and 'send_P' or just 'send' is present only in lib ESP8266WebServer.h.

Do you know about any other lib, which has these members and is compatible with AVR..? Or any other way to do same work, but with AVR lib EthernetServer.h..?

Thanks!

You know that the UNO has much less resources (RAM, Flash) available than the ESP8266, don't you? So you might have to limit the features you had on the ESp8266 if you port that to the UNO.

The ESP8266 is able to use the same libraries as the UNO if you connect the same hardware (WizNet5x00 for Ethernet.h).

there are even better Ethernet libraries for esp8266 than for AVR

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