I would appreciate some help with this very strange problem I'm having.
I've successfully adapted the very basic Web Server example supplied with the Ethernet Library to store all the HTML strings in program memory space, using the print(F("something"));
construct.
However, 1 issue remains unresolved: the very first HTML command in the page CANNOT be stored in program memory.
Thus:
client.print("<!-- -->"); // This is a comment line, containing a blank comment; it makes the page work!
client.println(F("<!DOCTYPE HTML>"
"<html>"
"<head>"
"<title>Arduino WEB Server Demo</title>"
"</head>"
"<body>"
"<h1>DEMO</h1>"));
works fine but without the blank comment line, it doesn't work, the HTML is not executed, but displayed in the browser window as text
client.println(F("<!DOCTYPE HTML>"
"<html>"
"<head>"
"<title>Arduino WEB Server Demo</title>"
"</head>"
"<body>"
"<h1>DEMO</h1>"));
Does anyone have any ideas? I've tried inserting blank lines etc but nothing seems to fix it.
I've attached the full sketch
Many thanks
Neil