Moderator: igrr
I found out, that I included some CSS/Javascript elements into the HTML-Page, I want to send over Wifi.
This is causing the messages.
But why?
I wrapped a
const char html_page1[] = R"=====(...)=====";
Why does the compiler take care of the content?
Perhaps martinayotte's idea with a seperate *.h file is the solution?
EDIT:
Looking deeper:
This line is causing the trouble:
<style type='text/css'>canvas{ border: 5px solid #000; -moz-border-radius: 30px; border-radius: 30px; -webkit-border-radius: 30px ;}</style>
and something inside here:
#info-box {
border: 3px solid #800;
padding: 10px;
position: absolute;
right: 1em;
top: 0px;
width: 250px;
}
ESP8266 Arduino add-on
Arduino IDE 1.6.5
brutzler wrote:Why does the compiler take care of the content?
It is not the compiler that cause problems, but the IDE pre-processor parsing the *.ino, so that's why moving them into separate files will help.
therefore I need a little help.
I made a WebPage1.h stored in the same directory.
Looking like this:
const char html_page1[] = R"=====(
<html>
<head>
.....
</html>
)=====";
Sending looks like this:
server.send ( 200, "text/html", html_page1);
I got an error: html_page1 is not declared...
Then I added a:
#include <WebPage1.h>
-->"...fatal error: WebPage1.h: No such file or directory"
???
EDIT:
Ahhhh...
#include "WebPage1.h"
ESP8266 Arduino add-on
Arduino IDE 1.6.5