I'm working on a project and it utilizes THIS code.
I've gotten all the libraries setup and now its compile time. The first error I get is a use of deleted function for
ESP8266WebServer server = ESP8266WebServer(HTTP_PORT);
per a post online I was able to get this working by changing it to ESP8266WebServer(HTTP_PORT);
but I don't understand why this is having a problem now when it compiled correctly when it was put on the board.
The next error after fixing that was expected unqualified-id before numeric constant for #define HTTP_PORT 80
This error I don't get because i've looked at several code blocks and none seem to require parentheses when defining a variable like this. the only thing I can think of is that when I look at the other defined variables, all of them are used in the function setup()
The last error so far is server not defined in scope. I'm almost certain this is because it was defined in
ESP8266WebServer server = ESP8266WebServer(HTTP_PORT);
which was removed when I changed it to ESP8266WebServer(HTTP_PORT);
floridaman:61: error: expected unqualified-id before numeric constant
#define HTTP_PORT 80
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino:74:18: note: in expansion of macro 'HTTP_PORT'
ESP8266WebServer(HTTP_PORT);
^
floridaman:61: error: expected ')' before numeric constant
#define HTTP_PORT 80
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino:74:18: note: in expansion of macro 'HTTP_PORT'
ESP8266WebServer(HTTP_PORT);
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino: In function 'void setup()':
floridaman:95: error: 'server' was not declared in this scope
server.on("/", srv_handle_index_html);
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino: In function 'void loop()':
floridaman:109: error: 'server' was not declared in this scope
server.handleClient();
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino: In function 'void srv_handle_not_found()':
floridaman:186: error: 'server' was not declared in this scope
server.send(404, "text/plain", "File Not Found");
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino: In function 'void srv_handle_index_html()':
floridaman:190: error: 'server' was not declared in this scope
server.send_P(200,"text/html", index_html);
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino: In function 'void srv_handle_main_js()':
floridaman:194: error: 'server' was not declared in this scope
server.send_P(200,"application/javascript", main_js);
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino: In function 'void srv_handle_modes()':
floridaman:198: error: 'server' was not declared in this scope
server.send(200,"text/plain", modes);
^
/home/crasis/Arduino/floridaman-master/floridaman/floridaman.ino: In function 'void srv_handle_set()':
floridaman:202: error: 'server' was not declared in this scope
for (uint8_t i = 0; i < server.args(); i++) {
^
floridaman:237: error: 'server' was not declared in this scope
server.send(200, "text/plain", "OK");
^
exit status 1
expected unqualified-id before numeric constant