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!